Closed vincentneo closed 1 year ago
Yes, if you view messages in an opened chat, their reactions will be eventually updated. But this doesn't mean that you can call viewMessages
for thousands messages and receive updated reactions for all of them. Only a few messages can be viewed in a time.
Understood with thanks. Since you've mentioned 'opened chat', looked at it and I think there's a race condition in my code. Maybe that's why it wasn't receiving the updates. (get chat history before opening chat)
Will see if things improve, and will close if proven that that's the reason.
Anyways, I observed that getChatHistory
only return populated reactions
in interaction_info
some of the times, not always, even if on the same chat & message. Why is that so?
getChatHistory
returns messages, which state is consistent with all other updates and request responses. If the message was recently viewed and its reactions were updated, then getChatHistory will return the updated data.
Thanks for the clarification on the getChatHistory
part.
From my end, my observation is still that updateMessageInteractionInfo
for the last message does not seem to send for the initial reactions, until when someone in the same channel/group sends a reaction for a particular message. (to clarify, it's sometimes, not always, seems pretty flaky?)
For context, this is how my sequence of calls are like:
openChat
getChatHistory
, recursively until recent 50 messages are retrieved.viewMessages
is called, with message id(s) of the most recent message, or most recent messages of same media album id.By the way, another question: when someone adds a reaction to a message associated with some other messages with the same media_album_id
, which exact message id will updateMessageInteractionInfo
consider towards?
Also, apologies if I'm asking too many questions.
when someone adds a reaction to a message associated with some other messages with the same media_album_id, which exact message id will updateMessageInteractionInfo consider towards?
Only the first message in an album can receive reactions. Apps aren't supposed to send reactions for other album messages.
According to #2214,
But how exactly does tdlib know which message is 'recently viewed'?
I assumed that it would be via the calling of the
viewMessages
function, but sometimes even after calling that, I still don't receive reactions.