Merge branch 'master' into develop
This commit is contained in:
commit
ef76f923ad
@ -59,10 +59,20 @@ class XEP_0054(BasePlugin):
|
|||||||
def make_vcard(self):
|
def make_vcard(self):
|
||||||
return VCardTemp()
|
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):
|
block=True, callback=None, timeout=None):
|
||||||
if self.xmpp.is_component and jid.domain == self.xmpp.boundjid.domain:
|
if local is None:
|
||||||
local = True
|
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:
|
if local:
|
||||||
vcard = self.api['get_vcard'](jid, None, ifrom)
|
vcard = self.api['get_vcard'](jid, None, ifrom)
|
||||||
|
@ -290,7 +290,7 @@ class XEP_0115(BasePlugin):
|
|||||||
# can just send a normal presence stanza. If we have, then
|
# can just send a normal presence stanza. If we have, then
|
||||||
# we will send presence to each contact individually so
|
# we will send presence to each contact individually so
|
||||||
# that we don't clobber existing statuses.
|
# that we don't clobber existing statuses.
|
||||||
directed = False
|
directed = False or self.xmpp.is_component
|
||||||
for contact in self.xmpp.roster[jid]:
|
for contact in self.xmpp.roster[jid]:
|
||||||
if self.xmpp.roster[jid][contact].last_status is not None:
|
if self.xmpp.roster[jid][contact].last_status is not None:
|
||||||
directed = True
|
directed = True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user