xep_0030: fix ifrom for disco queries sent by components

xep_0030 automatically sends disco queries with ifrom=None
Prosody's mod_component had a workaround to allow this non-standard behaviour, but it will change in a future release.
This commit is contained in:
nicoco 2022-08-29 00:03:55 +02:00
parent f5cb9fe66b
commit b14918808c

View file

@ -385,6 +385,8 @@ class XEP_0030(BasePlugin):
local = True
ifrom = kwargs.pop('ifrom', None)
if self.xmpp.is_component and ifrom is None:
ifrom = self.xmpp.boundjid
if local:
log.debug("Looking up local disco#info data "
"for %s, node %s.", jid, node)