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) {
|
|
|
|
fmt.Fprintf(c.conn, "<presence to='%s' type='subscribed'/>",
|
|
|
|
xmlEscape(jid))
|
2015-04-13 13:41:49 -07:00
|
|
|
}
|
|
|
|
|
2015-09-17 10:43:05 -07:00
|
|
|
func (c *Client) RevokeSubscription(jid string) {
|
|
|
|
fmt.Fprintf(c.conn, "<presence to='%s' type='unsubscribed'/>",
|
|
|
|
xmlEscape(jid))
|
2015-04-13 13:41:49 -07:00
|
|
|
}
|
|
|
|
|
2015-09-17 10:43:05 -07:00
|
|
|
func (c *Client) RequestSubscription(jid string) {
|
|
|
|
fmt.Fprintf(c.conn, "<presence to='%s' type='subscribe'/>",
|
|
|
|
xmlEscape(jid))
|
2015-04-13 13:41:49 -07:00
|
|
|
}
|