forked from jshiffer/go-xmpp
98ff0d4df7
* Rework printing of sent stanzas when debug is enabled This got reworked to also work with multiple connections as pointed out by @vcabbage in https://github.com/mattn/go-xmpp/pull/141#issuecomment-1557334066 * Remove StanzaWriter.
26 lines
594 B
Go
26 lines
594 B
Go
package xmpp
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
func (c *Client) ApproveSubscription(jid string) {
|
|
fmt.Fprintf(c.stanzaWriter, "<presence to='%s' type='subscribed'/>",
|
|
xmlEscape(jid))
|
|
}
|
|
|
|
func (c *Client) RevokeSubscription(jid string) {
|
|
fmt.Fprintf(c.stanzaWriter, "<presence to='%s' type='unsubscribed'/>",
|
|
xmlEscape(jid))
|
|
}
|
|
|
|
func (c *Client) RetrieveSubscription(jid string) {
|
|
fmt.Fprintf(c.conn, "<presence to='%s' type='unsubscribe'/>",
|
|
xmlEscape(jid))
|
|
}
|
|
|
|
func (c *Client) RequestSubscription(jid string) {
|
|
fmt.Fprintf(c.stanzaWriter, "<presence to='%s' type='subscribe'/>",
|
|
xmlEscape(jid))
|
|
}
|