summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2021-12-24 23:05:36 +0100
committerMaxime “pep” Buquet <pep@bouah.net>2021-12-24 23:05:36 +0100
commit49734de674eec666a9ff6a955ad2c01843f67908 (patch)
treeda73e2202b6a980460677dd7d83ae099eecd2759
parent1b7c6a79b50958aad03bac789e41224a2c866576 (diff)
downloadpoezio-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.py3
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])