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>
This commit is contained in:
Maxime “pep” Buquet 2022-02-25 20:11:56 +01:00
parent 2efdbf0490
commit f4185b7485

View file

@ -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))