Closed asarubbo closed 1 year ago
Hi,
I'll have a look a bit later, but in theory if tdlib returns the field it should be in the dictionary that get_message
returns.
I'm not sure how to get that directly, actually. get_message
indeed does not have this information.
I added a handler for updateMessageInteractionInfo
and it works only when a reaction is added to the message. An emoji for example. You can check this by adding it to the existing send_message example
import time
...
def update_message_interaction_info(update):
print(f'Received updateMessageInteractionInfo: {update}')
...
tg.add_update_handler('updateMessageInteractionInfo', update_message_interaction_info)
...
message_has_been_sent.wait(timeout=60)
print(f'Message has been sent.')
# sleep to allow the receiver to add a reaction to the message
time.sleep(300)
tg.stop()
What I also found is this issue: https://github.com/tdlib/td/issues/1878. If you send a message, then call get_chat
, you get back an object with last_read_inbox_message_id
and last_read_outbox_message_id
. You can compare them with the message id that you received from the server in update_message_send_succeeded_handler
(same send_message.py
example).
Please, reopen the issue if you have more questions.
Hello,
I didn't understand at all if is possible to have info about a message (if it was read or not).
On stackoverflow a user says that tdlib is able to do that, but when I call
get_message
I don't see aninteractionInfo
field.I can see something related in the scheme but I still don't understand if is possible to get that info or not, and If I can do something via python-telegram. If you have an example it would be great. Thanks