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 06dbefebb7
commit 7eb99bb436
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

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