From f8a50f12019a10b7696b233eb20a77207065bc71 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Wed, 9 Mar 2022 02:26:17 -0500 Subject: [PATCH] Mark long commands as read --- matrix_appservice_kakaotalk/commands/auth.py | 2 ++ matrix_appservice_kakaotalk/commands/conn.py | 1 + 2 files changed, 3 insertions(+) diff --git a/matrix_appservice_kakaotalk/commands/auth.py b/matrix_appservice_kakaotalk/commands/auth.py index 36aab59..df122af 100644 --- a/matrix_appservice_kakaotalk/commands/auth.py +++ b/matrix_appservice_kakaotalk/commands/auth.py @@ -128,6 +128,7 @@ async def enter_dv_code(evt: CommandEvent) -> None: assert(evt.sender.command_status) req: dict = evt.sender.command_status["req"] passcode = evt.content.body + await evt.mark_read() try: await KakaoTalkClient.register_device(passcode, **req) await _do_login(evt, req) @@ -191,6 +192,7 @@ async def reset_device(evt: CommandEvent) -> None: if await evt.sender.is_logged_in(): await evt.reply("This command requires you to be logged out.") else: + await evt.mark_read() await evt.sender.logout(reset_device=True) await evt.reply( "Your next login will use a different device ID.\n\n" diff --git a/matrix_appservice_kakaotalk/commands/conn.py b/matrix_appservice_kakaotalk/commands/conn.py index b390de0..12d1d39 100644 --- a/matrix_appservice_kakaotalk/commands/conn.py +++ b/matrix_appservice_kakaotalk/commands/conn.py @@ -71,6 +71,7 @@ async def ping(evt: CommandEvent) -> None: if not await evt.sender.is_logged_in(): await evt.reply("You're not logged into KakaoTalk") return + await evt.mark_read() # try: own_info = await evt.sender.get_own_info() # TODO catch errors