Skip to content

Commit

Permalink
delete self-messages immediately after delivery
Browse files Browse the repository at this point in the history
  • Loading branch information
adbenitez committed Mar 26, 2024
1 parent 1fd9409 commit f2e46dd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions voice2text_deltabot/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ def _log_event(bot: Bot, accid: int, event: AttrDict) -> None:
bot.logger.debug("QR scanned by contact id=%s", event.contact_id)
chatid = bot.rpc.create_chat_by_contact_id(accid, event.contact_id)
bot.rpc.send_msg(accid, chatid, {"text": HELP})
elif event.kind == EventType.MSG_DELIVERED:
bot.rpc.delete_messages(accid, [event.msg_id])


@cli.on(events.NewMessage(is_info=False, is_bot=None))
Expand Down

0 comments on commit f2e46dd

Please sign in to comment.