diff options
author | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-08-28 17:16:57 +0300 |
---|---|---|
committer | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-08-28 17:16:57 +0300 |
commit | 20994e29953dfc9c238f69d919912e0c26e36b97 (patch) | |
tree | c078032c172c2e49ea89ba35f2e0367de0da29ee /xmpp/gateway | |
parent | 8ba7596ab5b9cd731fb507f60da51c6acf1ef27f (diff) |
In-Band Registration (XEP-0077)dev
Diffstat (limited to 'xmpp/gateway')
-rw-r--r-- | xmpp/gateway/gateway.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xmpp/gateway/gateway.go b/xmpp/gateway/gateway.go index 7a2500e..dfe2ebf 100644 --- a/xmpp/gateway/gateway.go +++ b/xmpp/gateway/gateway.go @@ -360,6 +360,12 @@ func ResumableSend(component *xmpp.Component, packet stanza.Packet) error { return err } +// SubscribeToTransport ensures a two-way subscription to the transport +func SubscribeToTransport(component *xmpp.Component, jid string) { + SendPresence(component, jid, SPType("subscribe")) + SendPresence(component, jid, SPType("subscribed")) +} + // SplitJID tokenizes a JID string to bare JID and resource func SplitJID(from string) (string, string, bool) { fromJid, err := stanza.NewJid(from) |