diff options
author | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2021-12-18 19:04:24 +0300 |
---|---|---|
committer | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2021-12-18 19:04:24 +0300 |
commit | f2f20e680bb06ebda76f67f8fae9d7ed12498c63 (patch) | |
tree | 03eaeefb422396a6af55128b6b62230a9dd39b43 /xmpp/handlers.go | |
parent | ad6e92e6d602c40e4bd44be785e00f563393192a (diff) |
Fix %!(MISSING) and other formatting issues
Diffstat (limited to 'xmpp/handlers.go')
-rw-r--r-- | xmpp/handlers.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xmpp/handlers.go b/xmpp/handlers.go index 2e44411..ee767ad 100644 --- a/xmpp/handlers.go +++ b/xmpp/handlers.go @@ -24,7 +24,7 @@ func logPacketType(p stanza.Packet) { // HandleIq processes an incoming XMPP iq func HandleIq(s xmpp.Sender, p stanza.Packet) { - iq, ok := p.(stanza.IQ) + iq, ok := p.(*stanza.IQ) if !ok { logPacketType(p) return @@ -60,7 +60,7 @@ func HandleMessage(s xmpp.Sender, p stanza.Packet) { }).Warn("Message") log.Debugf("%#v", msg) - fromJid, err := xmpp.NewJid(msg.From) + fromJid, err := stanza.NewJid(msg.From) if err != nil { log.Error("Invalid from JID!") return @@ -155,7 +155,7 @@ func handlePresence(s xmpp.Sender, p stanza.Presence) { log.Debugf("%#v", p) // create session - fromJid, err := xmpp.NewJid(p.From) + fromJid, err := stanza.NewJid(p.From) if err != nil { log.Error("Invalid from JID!") return @@ -196,13 +196,13 @@ func handlePresence(s xmpp.Sender, p stanza.Presence) { } } -func handleGetVcardTempIq(s xmpp.Sender, iq stanza.IQ) { +func handleGetVcardTempIq(s xmpp.Sender, iq *stanza.IQ) { log.WithFields(log.Fields{ "from": iq.From, "to": iq.To, }).Warn("VCard request") - fromJid, err := xmpp.NewJid(iq.From) + fromJid, err := stanza.NewJid(iq.From) if err != nil { log.Error("Invalid from JID!") return @@ -274,5 +274,5 @@ func handleGetVcardTempIq(s xmpp.Sender, iq stanza.IQ) { return } - _ = gateway.ResumableSend(component, answer) + _ = gateway.ResumableSend(component, &answer) } |