mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2025-11-21 09:03:44 -08:00
An IQ can only have a single payload
"An IQ stanza of type "get" or "set" MUST contain exactly one child element, which specifies the semantics of the particular request."
This commit is contained in:
committed by
Mickaël Rémond
parent
d455f29258
commit
af0ae525b8
@@ -157,10 +157,10 @@ func (m nsIQMatcher) Match(p Packet, match *RouteMatch) bool {
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
if len(iq.Payload) < 1 {
|
||||
if iq.Payload == nil {
|
||||
return false
|
||||
}
|
||||
return matchInArray(m, iq.Payload[0].Namespace())
|
||||
return matchInArray(m, iq.Payload.Namespace())
|
||||
}
|
||||
|
||||
// IQNamespaces adds an IQ matcher, expecting both an IQ and a
|
||||
|
||||
Reference in New Issue
Block a user