Mercurial > libervia-backend
comparison sat/plugins/plugin_misc_text_commands.py @ 3544:ae5f63e5ed2c
plugin XEP-0045: fix `/join` text command
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 03 Jun 2021 17:59:41 +0200 |
parents | be6d91572633 |
children | 524856bd7b19 |
comparison
equal
deleted
inserted
replaced
3543:f19718296c20 | 3544:ae5f63e5ed2c |
---|---|
325 nb_arobas = arg.count("@") | 325 nb_arobas = arg.count("@") |
326 if nb_arobas == 1: | 326 if nb_arobas == 1: |
327 if arg[-1] != "@": | 327 if arg[-1] != "@": |
328 return jid.JID(arg) | 328 return jid.JID(arg) |
329 return jid.JID(arg + service_jid) | 329 return jid.JID(arg + service_jid) |
330 return jid.JID("%s@%s" % (arg, service_jid)) | 330 return jid.JID(f"{arg}@{service_jid}") |
331 | 331 |
332 def feedBack(self, client, message, mess_data, info_type=FEEDBACK_INFO_TYPE): | 332 def feedBack(self, client, message, mess_data, info_type=FEEDBACK_INFO_TYPE): |
333 """Give a message back to the user""" | 333 """Give a message back to the user""" |
334 if mess_data["type"] == "groupchat": | 334 if mess_data["type"] == "groupchat": |
335 to_ = mess_data["to"].userhostJID() | 335 to_ = mess_data["to"].userhostJID() |