Fixed an RFC 6120 violation when sending IQ error replies (hopefully this time for real). Thx jonasw.

This commit is contained in:
Martin Dosch 2018-08-07 22:56:53 +02:00
parent 64f7cb9f27
commit 3bdfea029e

View file

@ -204,8 +204,9 @@ func pingMUC(client *xmpp.Client, botJid string, Muc string, MucNick string) {
} }
} else { } else {
// Send error replies for all other IQs. // Send error replies for all other IQs.
_, err := client.RawInformation(client.JID(), v.From, v.ID, "error", _, err := client.RawInformation(client.JID(), v.From, v.ID, "error", string(v.Query)+
string(v.Query)+"<error/>") "<error type='cancel'><feature-not-implemented "+
"xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/><error/>")
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }