|
|
|
@ -183,13 +183,13 @@ func HandleMessage(s xmpp.Sender, p stanza.Packet) {
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
/*
|
|
|
|
|
// if a message failed to edit on Telegram side, match new XMPP ID with old Telegram ID anyway
|
|
|
|
|
if replaceId != 0 {
|
|
|
|
|
err = gateway.IdsDB.ReplaceXmppId(session.Session.Login, bare, replace.Id, msg.Id)
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.Errorf("Failed to replace id %v with %v", replace.Id, msg.Id)
|
|
|
|
|
}
|
|
|
|
|
} */
|
|
|
|
|
// if a message failed to edit on Telegram side, match new XMPP ID with old Telegram ID anyway
|
|
|
|
|
if replaceId != 0 {
|
|
|
|
|
err = gateway.IdsDB.ReplaceXmppId(session.Session.Login, bare, replace.Id, msg.Id)
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.Errorf("Failed to replace id %v with %v", replace.Id, msg.Id)
|
|
|
|
|
}
|
|
|
|
|
} */
|
|
|
|
|
}
|
|
|
|
|
return
|
|
|
|
|
} else {
|
|
|
|
@ -225,7 +225,7 @@ func HandleMessage(s xmpp.Sender, p stanza.Packet) {
|
|
|
|
|
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)
|
|
|
|
|
gateway.SendServiceMessage(bare, "Your server \""+msg.From+"\" does not allow to send carbons", component)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|