mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2024-11-21 10:02:00 -08:00
Fix error code
This commit is contained in:
parent
def9629a0b
commit
83f96fbd41
@ -40,7 +40,6 @@ func (r *Router) route(s Sender, p Packet) {
|
|||||||
match.Handler.HandlePacket(s, p)
|
match.Handler.HandlePacket(s, p)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there is no match and we receive an iq set or get, we need to send a reply
|
// If there is no match and we receive an iq set or get, we need to send a reply
|
||||||
if iq, ok := p.(IQ); ok {
|
if iq, ok := p.(IQ); ok {
|
||||||
if iq.Type == IQTypeGet || iq.Type == IQTypeSet {
|
if iq.Type == IQTypeGet || iq.Type == IQTypeSet {
|
||||||
@ -52,7 +51,7 @@ func (r *Router) route(s Sender, p Packet) {
|
|||||||
func iqNotImplemented(s Sender, iq IQ) {
|
func iqNotImplemented(s Sender, iq IQ) {
|
||||||
err := Err{
|
err := Err{
|
||||||
XMLName: xml.Name{Local: "error"},
|
XMLName: xml.Name{Local: "error"},
|
||||||
Code: 500,
|
Code: 501,
|
||||||
Type: "cancel",
|
Type: "cancel",
|
||||||
Reason: "feature-not-implemented",
|
Reason: "feature-not-implemented",
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user