summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/matterbridge/go-xmpp/xmpp_subscription.go
blob: eb293141a3cbdbd47da64f333fc4612135f0bfa5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package xmpp

import (
	"fmt"
)

func (c *Client) ApproveSubscription(jid string) {
	fmt.Fprintf(c.conn, "<presence to='%s' type='subscribed'/>",
		xmlEscape(jid))
}

func (c *Client) RevokeSubscription(jid string) {
	fmt.Fprintf(c.conn, "<presence to='%s' type='unsubscribed'/>",
		xmlEscape(jid))
}

func (c *Client) RequestSubscription(jid string) {
	fmt.Fprintf(c.conn, "<presence to='%s' type='subscribe'/>",
		xmlEscape(jid))
}