summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sleekxmpp/api.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sleekxmpp/api.py b/sleekxmpp/api.py
index 4004f5b7..8de61b34 100644
--- a/sleekxmpp/api.py
+++ b/sleekxmpp/api.py
@@ -101,8 +101,10 @@ class APIRegistry(object):
if not jid:
jid = self.xmpp.boundjid
- if jid and not isinstance(jid, JID):
+ elif jid and not isinstance(jid, JID):
jid = JID(jid)
+ elif jid == JID(''):
+ jid = self.xmpp.boundjid
if node is None:
node = ''