plugin XEP-0060: specify sender using client.jid in subscribe:

this is necessary to do a subscription with a component managing a virtual JID (i.e. not
the JID of the component itself, but the one linked to a account, see
`SatXMPPComponent.getVirtualClient`).

rel 364
This commit is contained in:
Goffi 2022-03-22 17:00:42 +01:00
commit 81513eb7d8

View file

@ -1130,7 +1130,8 @@ class XEP_0060(object):
) -> pubsub.Subscription:
# TODO: reimplement a subscribtion cache, checking that we have not subscription before trying to subscribe
subscription = await client.pubsub_client.subscribe(
service, nodeIdentifier, sub_jid or client.jid.userhostJID(), options=options
service, nodeIdentifier, sub_jid or client.jid.userhostJID(), options=options,
sender=client.jid.userhostJID()
)
await self.host.trigger.asyncPoint(
"XEP-0060_subscribe", client, service, nodeIdentifier, sub_jid, options,