mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-05-23 20:33:46 -07:00
Rework printing of sent stanzas when debug is enabled (#148)
* Rework printing of sent stanzas when debug is enabled This got reworked to also work with multiple connections as pointed out by @vcabbage in https://github.com/mattn/go-xmpp/pull/141#issuecomment-1557334066 * Remove StanzaWriter.
This commit is contained in:
@@ -5,12 +5,12 @@ import (
|
||||
)
|
||||
|
||||
func (c *Client) ApproveSubscription(jid string) {
|
||||
fmt.Fprintf(StanzaWriter, "<presence to='%s' type='subscribed'/>",
|
||||
fmt.Fprintf(c.stanzaWriter, "<presence to='%s' type='subscribed'/>",
|
||||
xmlEscape(jid))
|
||||
}
|
||||
|
||||
func (c *Client) RevokeSubscription(jid string) {
|
||||
fmt.Fprintf(StanzaWriter, "<presence to='%s' type='unsubscribed'/>",
|
||||
fmt.Fprintf(c.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(StanzaWriter, "<presence to='%s' type='subscribe'/>",
|
||||
fmt.Fprintf(c.stanzaWriter, "<presence to='%s' type='subscribe'/>",
|
||||
xmlEscape(jid))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user