From 49734de674eec666a9ff6a955ad2c01843f67908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Fri, 24 Dec 2021 23:05:36 +0100 Subject: destroy_room: Allow empty altroom argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- poezio/core/commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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]) -- cgit v1.2.3