Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

media_album_id in Message is passed as string #179

Closed
Arman92 opened this issue Apr 4, 2018 · 2 comments
Closed

media_album_id in Message is passed as string #179

Arman92 opened this issue Apr 4, 2018 · 2 comments

Comments

@Arman92
Copy link

Arman92 commented Apr 4, 2018

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!

@ldb
Copy link
Contributor

ldb commented Apr 4, 2018

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.

@Arman92
Copy link
Author

Arman92 commented Apr 4, 2018

Oh.. Thanks

@Arman92 Arman92 closed this as completed Apr 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants