mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2024-11-23 19:12:00 -08:00
fix iq - get after refactoring routing on #55
This commit is contained in:
parent
1a7aa94bae
commit
44681e8053
@ -59,6 +59,10 @@ func discoInfo(c xmpp.Sender, p xmpp.Packet, opts xmpp.ComponentOptions) {
|
||||
return
|
||||
}
|
||||
|
||||
if iq.Type != "get" {
|
||||
return
|
||||
}
|
||||
|
||||
iqResp := xmpp.NewIQ("result", iq.To, iq.From, iq.Id, "en")
|
||||
identity := xmpp.Identity{
|
||||
Name: opts.Name,
|
||||
@ -90,12 +94,12 @@ func discoItems(c xmpp.Sender, p xmpp.Packet) {
|
||||
return
|
||||
}
|
||||
|
||||
discoItems, ok := iq.Payload.(*xmpp.DiscoItems)
|
||||
if !ok {
|
||||
if iq.Type != "get" {
|
||||
return
|
||||
}
|
||||
|
||||
if iq.Type != "get" {
|
||||
discoItems, ok := iq.Payload.(*xmpp.DiscoItems)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user