Print sent stanzas in debug mode. (#141)

* Print sent stanzas in debug mode.

* Remove unnecessary newline.
This commit is contained in:
Martin
2023-03-02 05:22:44 +01:00
committed by GitHub
parent 05cd75074a
commit 9fc0b1236c
5 changed files with 37 additions and 34 deletions
+3 -3
View File
@@ -5,12 +5,12 @@ import (
)
func (c *Client) ApproveSubscription(jid string) {
fmt.Fprintf(c.conn, "<presence to='%s' type='subscribed'/>",
fmt.Fprintf(StanzaWriter, "<presence to='%s' type='subscribed'/>",
xmlEscape(jid))
}
func (c *Client) RevokeSubscription(jid string) {
fmt.Fprintf(c.conn, "<presence to='%s' type='unsubscribed'/>",
fmt.Fprintf(StanzaWriter, "<presence to='%s' type='unsubscribed'/>",
xmlEscape(jid))
}
@@ -20,6 +20,6 @@ func (c *Client) RetrieveSubscription(jid string) {
}
func (c *Client) RequestSubscription(jid string) {
fmt.Fprintf(c.conn, "<presence to='%s' type='subscribe'/>",
fmt.Fprintf(StanzaWriter, "<presence to='%s' type='subscribe'/>",
xmlEscape(jid))
}