summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-07-25 01:33:44 -0700
committerLance Stout <lancestout@gmail.com>2012-07-25 01:33:44 -0700
commit7b80ed0807d16f041b66e5c1c51c533fe6c7e614 (patch)
treec015b3e0227260ae51339eb4766198c99800aa1b
parent98b7e8b10ab61af194559bfde0969032b35809c0 (diff)
downloadslixmpp-7b80ed0807d16f041b66e5c1c51c533fe6c7e614.tar.gz
slixmpp-7b80ed0807d16f041b66e5c1c51c533fe6c7e614.tar.bz2
slixmpp-7b80ed0807d16f041b66e5c1c51c533fe6c7e614.tar.xz
slixmpp-7b80ed0807d16f041b66e5c1c51c533fe6c7e614.zip
Substitute a blank JID for the boundjid in API calls.
-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 = ''