You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a file is sent, the server may change the type of message after it was sent. For example, ctx.send({ video }) might end up returning a document message with message.document.file_id being the file identifier of the uploaded file. It isn't known which type of message we will receive, so it is tedious to check all different types of messages every time in order to obtain the file identifier.
We should hydrate API call results and install message.file_id on the resulting message object. It should be an alias for getting the file identifier from many different places.
For consistency, we should also do this for incoming messages—otherwise people will be confused why some message objects have this property and some don't.
The text was updated successfully, but these errors were encountered:
When a file is sent, the server may change the type of message after it was sent. For example,
ctx.send({ video })
might end up returning a document message withmessage.document.file_id
being the file identifier of the uploaded file. It isn't known which type of message we will receive, so it is tedious to check all different types of messages every time in order to obtain the file identifier.We should hydrate API call results and install
message.file_id
on the resulting message object. It should be an alias for getting the file identifier from many different places.For consistency, we should also do this for incoming messages—otherwise people will be confused why some message objects have this property and some don't.
The text was updated successfully, but these errors were encountered: