tdlib / td

Cross-platform library for building Telegram clients

Home Page:https://core.telegram.org/tdlib

Repository from Github https://github.comtdlib/tdRepository from Github https://github.comtdlib/td

media_album_id in Message is passed as string

Arman92 opened this issue · comments

I'm using tdjson bindings, the field media_album_id in Message is passed as json string, which should be a number.

Steps to reproduce:
Send a text message, wait for an UpdateNewMessage to arrive, catch the bug!

commented

That's because media_album_id is of type int_64. JSON does not support 64 bit integer so they are encoded as strings.
That is also documented here:

int32, int53 and double fields are stored as Numbers. int64 and string fields are stored as Strings.

Oh.. Thanks