aboutsummaryrefslogtreecommitdiff
path: root/xmpp/handlers.go
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp/handlers.go')
-rw-r--r--xmpp/handlers.go12
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)
}