Add config for glangci-lint, lint, handle "wire" errors fo auth procedure
This commit is contained in:
@@ -4,22 +4,30 @@ import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func (c *Client) ApproveSubscription(jid string) {
|
||||
fmt.Fprintf(StanzaWriter, "<presence to='%s' type='subscribed'/>",
|
||||
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) {
|
||||
fmt.Fprintf(StanzaWriter, "<presence to='%s' type='unsubscribed'/>",
|
||||
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) {
|
||||
fmt.Fprintf(c.conn, "<presence to='%s' type='unsubscribe'/>",
|
||||
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) {
|
||||
fmt.Fprintf(StanzaWriter, "<presence to='%s' type='subscribe'/>",
|
||||
func (c *Client) RequestSubscription(jid string) error {
|
||||
_, err := fmt.Fprintf(StanzaWriter, "<presence to='%s' type='subscribe'/>",
|
||||
xmlEscape(jid))
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user