From 20994e29953dfc9c238f69d919912e0c26e36b97 Mon Sep 17 00:00:00 2001 From: Bohdan Horbeshko Date: Mon, 28 Aug 2023 10:16:57 -0400 Subject: In-Band Registration (XEP-0077) --- xmpp/gateway/gateway.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xmpp/gateway/gateway.go') 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) -- cgit v1.2.3