2015-04-13 13:41:49 -07:00
|
|
|
package xmpp
|
|
|
|
|
|
|
|
import (
|
2015-09-17 10:43:05 -07:00
|
|
|
"fmt"
|
2015-04-13 13:41:49 -07:00
|
|
|
)
|
|
|
|
|
2015-09-17 10:43:05 -07:00
|
|
|
func (c *Client) ApproveSubscription(jid string) {
|
2023-08-14 01:28:33 -07:00
|
|
|
fmt.Fprintf(c.stanzaWriter, "<presence to='%s' type='subscribed'/>\n",
|
2015-09-17 10:43:05 -07:00
|
|
|
xmlEscape(jid))
|
2015-04-13 13:41:49 -07:00
|
|
|
}
|
|
|
|
|
2015-09-17 10:43:05 -07:00
|
|
|
func (c *Client) RevokeSubscription(jid string) {
|
2023-08-14 01:28:33 -07:00
|
|
|
fmt.Fprintf(c.stanzaWriter, "<presence to='%s' type='unsubscribed'/>\n",
|
2015-09-17 10:43:05 -07:00
|
|
|
xmlEscape(jid))
|
2015-04-13 13:41:49 -07:00
|
|
|
}
|
|
|
|
|
2023-03-01 17:32:52 -08:00
|
|
|
func (c *Client) RetrieveSubscription(jid string) {
|
2023-08-14 01:28:33 -07:00
|
|
|
fmt.Fprintf(c.conn, "<presence to='%s' type='unsubscribe'/>\n",
|
2023-03-01 17:32:52 -08:00
|
|
|
xmlEscape(jid))
|
|
|
|
}
|
|
|
|
|
2015-09-17 10:43:05 -07:00
|
|
|
func (c *Client) RequestSubscription(jid string) {
|
2023-08-14 01:28:33 -07:00
|
|
|
fmt.Fprintf(c.stanzaWriter, "<presence to='%s' type='subscribe'/>\n",
|
2015-09-17 10:43:05 -07:00
|
|
|
xmlEscape(jid))
|
2015-04-13 13:41:49 -07:00
|
|
|
}
|