| 1 |
package xmpp |
| 2 |
|
| 3 |
import ( |
| 4 |
"fmt" |
| 5 |
) |
| 6 |
|
| 7 |
func (c *Client) ApproveSubscription(jid string) { |
| 8 |
fmt.Fprintf(c.stanzaWriter, "<presence to='%s' type='subscribed'/>\n", |
| 9 |
xmlEscape(jid)) |
| 10 |
} |
| 11 |
|
| 12 |
func (c *Client) RevokeSubscription(jid string) { |
| 13 |
fmt.Fprintf(c.stanzaWriter, "<presence to='%s' type='unsubscribed'/>\n", |
| 14 |
xmlEscape(jid)) |
| 15 |
} |
| 16 |
|
| 17 |
// Deprecated: Use RevertSubscription instead. |
| 18 |
func (c *Client) RetrieveSubscription(jid string) { |
| 19 |
c.RevertSubscription(jid) |
| 20 |
} |
| 21 |
|
| 22 |
func (c *Client) RevertSubscription(jid string) { |
| 23 |
fmt.Fprintf(c.conn, "<presence to='%s' type='unsubscribe'/>\n", |
| 24 |
xmlEscape(jid)) |
| 25 |
} |
| 26 |
|
| 27 |
func (c *Client) RequestSubscription(jid string) { |
| 28 |
fmt.Fprintf(c.stanzaWriter, "<presence to='%s' type='subscribe'/>\n", |
| 29 |
xmlEscape(jid)) |
| 30 |
} |