From 5c076933e75ca246210214694be67f03ae5fa422 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 31 May 2019 01:24:48 +0300 Subject: [PATCH] Apparently session hashes can be negative integers too --- mautrix_telegram/commands/telegram/account.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mautrix_telegram/commands/telegram/account.py b/mautrix_telegram/commands/telegram/account.py index 15add619..e5eaf003 100644 --- a/mautrix_telegram/commands/telegram/account.py +++ b/mautrix_telegram/commands/telegram/account.py @@ -106,9 +106,7 @@ async def session(evt: CommandEvent) -> Optional[Dict]: try: session_hash = int(evt.args[1]) except ValueError: - return await evt.reply("Hash must be a positive integer") - if session_hash <= 0: - return await evt.reply("Hash must be a positive integer") + return await evt.reply("Hash must be an integer") try: ok = await evt.sender.client(ResetAuthorizationRequest(hash=session_hash)) except HashInvalidError: