diff options
Diffstat (limited to 'xmpp/handlers.go')
-rw-r--r-- | xmpp/handlers.go | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/xmpp/handlers.go b/xmpp/handlers.go index 8778423..2e44411 100644 --- a/xmpp/handlers.go +++ b/xmpp/handlers.go @@ -126,7 +126,13 @@ func handleSubscription(s xmpp.Sender, p stanza.Presence) { Type: "subscribed", }} - _ = s.Send(reply) + component, ok := s.(*xmpp.Component) + if !ok { + log.Error("Not a component") + return + } + + _ = gateway.ResumableSend(component, reply) } func handlePresence(s xmpp.Sender, p stanza.Presence) { @@ -262,5 +268,11 @@ func handleGetVcardTempIq(s xmpp.Sender, iq stanza.IQ) { } log.Debugf("%#v", answer) - _ = s.Send(answer) + component, ok := s.(*xmpp.Component) + if !ok { + log.Error("Not a component") + return + } + + _ = gateway.ResumableSend(component, answer) } |