Files
buny-jabber-bot/vendor/github.com/xmppo/go-xmpp/xmpp_subscription.go
eleksir 3d85dbcb58 [WIP] Fix ban by software version, some other under-hood changes
- Use updated version of upstream go-xmpp + fixes on client-side
- Introduce golangci-lint v2 + fixes
- Move especially noisy debugging stuff to separate config handles to be able to switch them off
- Add a bit debug to ban by software path
2025-12-16 00:51:10 +03:00

31 lines
729 B
Go

package xmpp
import (
"fmt"
)
func (c *Client) ApproveSubscription(jid string) {
fmt.Fprintf(c.stanzaWriter, "<presence to='%s' type='subscribed'/>\n",
xmlEscape(jid))
}
func (c *Client) RevokeSubscription(jid string) {
fmt.Fprintf(c.stanzaWriter, "<presence to='%s' type='unsubscribed'/>\n",
xmlEscape(jid))
}
// Deprecated: Use RevertSubscription instead.
func (c *Client) RetrieveSubscription(jid string) {
c.RevertSubscription(jid)
}
func (c *Client) RevertSubscription(jid string) {
fmt.Fprintf(c.conn, "<presence to='%s' type='unsubscribe'/>\n",
xmlEscape(jid))
}
func (c *Client) RequestSubscription(jid string) {
fmt.Fprintf(c.stanzaWriter, "<presence to='%s' type='subscribe'/>\n",
xmlEscape(jid))
}