XEP-0054: fix component handling of vcard requests

Fetching the local vcard for the JID from which the stanza originates
does not make sense.
This commit is contained in:
mathieui 2021-02-13 21:58:13 +01:00
parent f50dfd6644
commit 3eeef6b4b6

View file

@ -131,7 +131,7 @@ class XEP_0054(BasePlugin):
self.api['set_vcard'](jid=iq['from'], args=iq['vcard_temp']) self.api['set_vcard'](jid=iq['from'], args=iq['vcard_temp'])
return return
elif iq['type'] == 'get' and self.xmpp.is_component: elif iq['type'] == 'get' and self.xmpp.is_component:
vcard = self.api['get_vcard'](iq['from'].bare) vcard = self.api['get_vcard'](iq['to'].bare, ifrom=iq['from'])
if isinstance(vcard, Iq): if isinstance(vcard, Iq):
vcard.send() vcard.send()
else: else: