diff options
author | Maxime “pep” Buquet <pep@bouah.net> | 2021-12-24 23:05:36 +0100 |
---|---|---|
committer | Maxime “pep” Buquet <pep@bouah.net> | 2021-12-24 23:05:36 +0100 |
commit | 49734de674eec666a9ff6a955ad2c01843f67908 (patch) | |
tree | da73e2202b6a980460677dd7d83ae099eecd2759 | |
parent | 1b7c6a79b50958aad03bac789e41224a2c866576 (diff) | |
download | poezio-49734de674eec666a9ff6a955ad2c01843f67908.tar.gz poezio-49734de674eec666a9ff6a955ad2c01843f67908.tar.bz2 poezio-49734de674eec666a9ff6a955ad2c01843f67908.tar.xz poezio-49734de674eec666a9ff6a955ad2c01843f67908.zip |
destroy_room: Allow empty altroom argument
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r-- | poezio/core/commands.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/poezio/core/commands.py b/poezio/core/commands.py index 717f77ce..3225b61e 100644 --- a/poezio/core/commands.py +++ b/poezio/core/commands.py @@ -1153,7 +1153,7 @@ class CommandCore: """ /destroy_room [JID [reason [alternative room JID]]] """ - async def do_destroy(room: JID, reason: str, altroom: JID): + async def do_destroy(room: JID, reason: str, altroom: Optional[JID]): try: await self.core.xmpp['xep_0045'].destroy(room, reason, altroom) except (IqError, IqTimeout) as e: @@ -1178,6 +1178,7 @@ class CommandCore: return reason = args[1] + altroom = None if args[2]: try: altroom = JID(args[2]) |