|
|
|
@ -168,6 +168,15 @@ func HandleMessage(s xmpp.Sender, p stanza.Packet) {
|
|
|
|
|
|
|
|
|
|
if msg.Type == "error" {
|
|
|
|
|
log.Errorf("MESSAGE ERROR: %#v", p)
|
|
|
|
|
|
|
|
|
|
if msg.XMLName.Space == "jabber:component:accept" && msg.Error.Code == 401 {
|
|
|
|
|
suffix := "@" + msg.From
|
|
|
|
|
for bare := range sessions {
|
|
|
|
|
if strings.HasSuffix(bare, suffix) {
|
|
|
|
|
gateway.SendServiceMessage(bare, "Your server \"" + msg.From + "\" does not allow to send carbons", component)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|