summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0054
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2013-01-02 17:05:35 -0800
committerLance Stout <lancestout@gmail.com>2013-01-02 17:05:35 -0800
commitef76f923ad885d8faa67e88d76704cbe8253b153 (patch)
tree4fc443614e3551daad8ea174b515ca5037497c8c /sleekxmpp/plugins/xep_0054
parent0e2abe74d5d978ee701576d6e00eb35919dffb70 (diff)
parent2c04ae084ca2233f45776b32614b1e575db93449 (diff)
downloadslixmpp-ef76f923ad885d8faa67e88d76704cbe8253b153.tar.gz
slixmpp-ef76f923ad885d8faa67e88d76704cbe8253b153.tar.bz2
slixmpp-ef76f923ad885d8faa67e88d76704cbe8253b153.tar.xz
slixmpp-ef76f923ad885d8faa67e88d76704cbe8253b153.zip
Merge branch 'master' into develop
Diffstat (limited to 'sleekxmpp/plugins/xep_0054')
-rw-r--r--sleekxmpp/plugins/xep_0054/vcard_temp.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/sleekxmpp/plugins/xep_0054/vcard_temp.py b/sleekxmpp/plugins/xep_0054/vcard_temp.py
index 24da1c05..09acd454 100644
--- a/sleekxmpp/plugins/xep_0054/vcard_temp.py
+++ b/sleekxmpp/plugins/xep_0054/vcard_temp.py
@@ -59,10 +59,20 @@ class XEP_0054(BasePlugin):
def make_vcard(self):
return VCardTemp()
- def get_vcard(self, jid=None, ifrom=None, local=False, cached=False,
+ def get_vcard(self, jid=None, ifrom=None, local=None, cached=False,
block=True, callback=None, timeout=None):
- if self.xmpp.is_component and jid.domain == self.xmpp.boundjid.domain:
- local = True
+ if local is None:
+ if jid is not None and not isinstance(jid, JID):
+ jid = JID(jid)
+ if self.xmpp.is_component:
+ if jid.domain == self.xmpp.boundjid.domain:
+ local = True
+ else:
+ if str(jid) == str(self.xmpp.boundjid):
+ local = True
+ jid = jid.full
+ elif jid in (None, ''):
+ local = True
if local:
vcard = self.api['get_vcard'](jid, None, ifrom)