summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2020-11-27 20:06:53 +0100
committermathieui <mathieui@mathieui.net>2020-11-27 20:06:53 +0100
commitc3a6352a6b8162fb560b15ef4780ee95b8e34f1a (patch)
tree5932eece07798538aab12bc3edad8ce545d35d8b
parent086dc894d14cc0b45901de298b115c213bf5eda3 (diff)
parentf90713cb9e14b6b05903f570b598ea7f8050a37f (diff)
downloadslixmpp-c3a6352a6b8162fb560b15ef4780ee95b8e34f1a.tar.gz
slixmpp-c3a6352a6b8162fb560b15ef4780ee95b8e34f1a.tar.bz2
slixmpp-c3a6352a6b8162fb560b15ef4780ee95b8e34f1a.tar.xz
slixmpp-c3a6352a6b8162fb560b15ef4780ee95b8e34f1a.zip
Merge branch 'fix-xep_0115-disco-component' into 'master'
Fix 'from' attribute missing for ComponentXMPP Disco IQ Closes #3455 See merge request poezio/slixmpp!60
-rw-r--r--slixmpp/plugins/xep_0115/caps.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/slixmpp/plugins/xep_0115/caps.py b/slixmpp/plugins/xep_0115/caps.py
index 749b74bd..0acfa83a 100644
--- a/slixmpp/plugins/xep_0115/caps.py
+++ b/slixmpp/plugins/xep_0115/caps.py
@@ -157,10 +157,12 @@ class XEP_0115(BasePlugin):
self.assign_verstring(pres['from'], ver)
return
+ ifrom = pres['to'] if self.xmpp.is_component else None
+
if pres['caps']['hash'] not in self.hashes:
try:
log.debug("Unknown caps hash: %s", pres['caps']['hash'])
- self.xmpp['xep_0030'].get_info(jid=pres['from'])
+ self.xmpp['xep_0030'].get_info(jid=pres['from'], ifrom=ifrom)
return
except XMPPError:
return
@@ -169,7 +171,8 @@ class XEP_0115(BasePlugin):
try:
node = '%s#%s' % (pres['caps']['node'], ver)
caps = await self.xmpp['xep_0030'].get_info(pres['from'], node,
- coroutine=True)
+ coroutine=True,
+ ifrom=ifrom)
if isinstance(caps, Iq):
caps = caps['disco_info']