summaryrefslogtreecommitdiff
path: root/src/core/commands.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-04-14 22:32:34 +0200
committermathieui <mathieui@mathieui.net>2014-04-14 22:32:34 +0200
commit3221534b0f77a00043032c1e350814f607a56380 (patch)
tree6c7bd391e3c2e70c40efdb0c0249d676036899a3 /src/core/commands.py
parent245f5f050cd1b72f365a21c57d3462ed5207e0cc (diff)
downloadpoezio-3221534b0f77a00043032c1e350814f607a56380.tar.gz
poezio-3221534b0f77a00043032c1e350814f607a56380.tar.bz2
poezio-3221534b0f77a00043032c1e350814f607a56380.tar.xz
poezio-3221534b0f77a00043032c1e350814f607a56380.zip
Implement XEP-0249 (Direct MUC Invitations)
- fallback to mediated invitations if only the bare jid is given to the command or if the jid does not advertise support TODO: provide a way to send passwords
Diffstat (limited to 'src/core/commands.py')
-rw-r--r--src/core/commands.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/commands.py b/src/core/commands.py
index 39bf505d..dcbd762f 100644
--- a/src/core/commands.py
+++ b/src/core/commands.py
@@ -698,10 +698,10 @@ def command_invite(self, arg):
args = common.shell_split(arg)
if len(args) < 2:
return
- reason = args[2] if len(args) > 2 else ''
+ reason = args[2] if len(args) > 2 else None
to = safeJID(args[0])
- room = safeJID(args[1])
- self.xmpp.plugin['xep_0045'].invite(room, str(to), reason)
+ room = safeJID(args[1]).bare
+ self.invite(to.full, room, reason=reason)
def command_decline(self, arg):
"""/decline <room@server.tld> [reason]"""