From 7eb99bb43637ec17bf60a8321c41069563ae74af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Fri, 25 Feb 2022 20:11:56 +0100 Subject: [PATCH] bookmark nick: Treat empty string as no nick MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And prevent the JID() call from failing with InvalidJid because of the empty resource. Signed-off-by: Maxime “pep” Buquet --- poezio/core/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poezio/core/commands.py b/poezio/core/commands.py index 4c7b3e4f..cc98dbf6 100644 --- a/poezio/core/commands.py +++ b/poezio/core/commands.py @@ -526,7 +526,7 @@ class CommandCore: # Validate / Normalize try: - if nick is None: + if not nick: jid = JID(room) else: jid = JID('{}/{}'.format(room, nick))