summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2022-02-25 20:11:56 +0100
committerMaxime “pep” Buquet <pep@bouah.net>2022-02-25 20:11:56 +0100
commit7eb99bb43637ec17bf60a8321c41069563ae74af (patch)
tree14f8665ab0e01213e836ae4f3f577e9ef0bb2a4e
parent06dbefebb763c86bee3e242e290370df6f7d50f5 (diff)
downloadpoezio-7eb99bb43637ec17bf60a8321c41069563ae74af.tar.gz
poezio-7eb99bb43637ec17bf60a8321c41069563ae74af.tar.bz2
poezio-7eb99bb43637ec17bf60a8321c41069563ae74af.tar.xz
poezio-7eb99bb43637ec17bf60a8321c41069563ae74af.zip
bookmark nick: Treat empty string as no nick
And prevent the JID() call from failing with InvalidJid because of the empty resource. Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r--poezio/core/commands.py2
1 files changed, 1 insertions, 1 deletions
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))