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
This commit is contained in:
commit
c3a6352a6b
1 changed files with 5 additions and 2 deletions
|
@ -157,10 +157,12 @@ class XEP_0115(BasePlugin):
|
||||||
self.assign_verstring(pres['from'], ver)
|
self.assign_verstring(pres['from'], ver)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
ifrom = pres['to'] if self.xmpp.is_component else None
|
||||||
|
|
||||||
if pres['caps']['hash'] not in self.hashes:
|
if pres['caps']['hash'] not in self.hashes:
|
||||||
try:
|
try:
|
||||||
log.debug("Unknown caps hash: %s", pres['caps']['hash'])
|
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
|
return
|
||||||
except XMPPError:
|
except XMPPError:
|
||||||
return
|
return
|
||||||
|
@ -169,7 +171,8 @@ class XEP_0115(BasePlugin):
|
||||||
try:
|
try:
|
||||||
node = '%s#%s' % (pres['caps']['node'], ver)
|
node = '%s#%s' % (pres['caps']['node'], ver)
|
||||||
caps = await self.xmpp['xep_0030'].get_info(pres['from'], node,
|
caps = await self.xmpp['xep_0030'].get_info(pres['from'], node,
|
||||||
coroutine=True)
|
coroutine=True,
|
||||||
|
ifrom=ifrom)
|
||||||
|
|
||||||
if isinstance(caps, Iq):
|
if isinstance(caps, Iq):
|
||||||
caps = caps['disco_info']
|
caps = caps['disco_info']
|
||||||
|
|
Loading…
Reference in a new issue