Mercurial > libervia-backend
changeset 3737:783d6dc87b80
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
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 22 Mar 2022 17:00:42 +0100 |
parents | e52de21873d3 |
children | ffa8c8c78115 |
files | sat/plugins/plugin_xep_0060.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/sat/plugins/plugin_xep_0060.py Tue Mar 22 17:00:42 2022 +0100 +++ b/sat/plugins/plugin_xep_0060.py Tue Mar 22 17:00:42 2022 +0100 @@ -1130,7 +1130,8 @@ ) -> 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,