def update_msg_content_opened(self, chat_id: int, msg_id: int) -> None: msg = self.msgs[chat_id].get(msg_id) if not msg: return msg_proxy = MsgProxy(msg) if msg_proxy.content_type == "voice": msg_proxy.is_listened = True elif msg_proxy.content_type == "recording": msg_proxy.is_viewed = True
def update_msg_content_opened(self, chat_id: int, msg_id: int) -> None: index = self.msg_idx[chat_id].get(msg_id) if not index: return msg = MsgProxy(self.msgs[chat_id][index]) if msg.content_type == "voice": msg.is_listened = True elif msg.content_type == "recording": msg.is_viewed = True
def update_msg_content_opened(self, chat_id: int, msg_id: int): for message in self.msgs[chat_id]: if message["id"] != msg_id: continue msg = MsgProxy(message) if msg.content_type == "voice": msg.is_listened = True elif msg.content_type == "recording": msg.is_viewed = True # TODO: start the TTL timer for self-destructing messages # that is the last case to implement # https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1update_message_content_opened.html return