- Use updated version of upstream go-xmpp + fixes on client-side - Still waiting for https://github.com/xmppo/go-xmpp/pull/215 - Introduce golangci-lint v2 + fixes
31 lines
729 B
Go
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))
|
|
}
|