0

[WIP] Initial commit

This commit is contained in:
eleksir
2023-10-08 11:41:10 -07:00
commit a3e6ef65ed
1522 changed files with 653924 additions and 0 deletions

33
vendor/github.com/eleksir/go-xmpp/xmpp_subscription.go generated vendored Normal file
View File

@@ -0,0 +1,33 @@
package xmpp
import (
"fmt"
)
func (c *Client) ApproveSubscription(jid string) error {
_, err := fmt.Fprintf(StanzaWriter, "<presence to='%s' type='subscribed'/>",
xmlEscape(jid))
return err
}
func (c *Client) RevokeSubscription(jid string) error {
_, err := fmt.Fprintf(StanzaWriter, "<presence to='%s' type='unsubscribed'/>",
xmlEscape(jid))
return err
}
func (c *Client) RetrieveSubscription(jid string) error {
_, err := fmt.Fprintf(c.conn, "<presence to='%s' type='unsubscribe'/>",
xmlEscape(jid))
return err
}
func (c *Client) RequestSubscription(jid string) error {
_, err := fmt.Fprintf(StanzaWriter, "<presence to='%s' type='subscribe'/>",
xmlEscape(jid))
return err
}