From e954c73bd2d881bc448b6bb2b3cb3a4ad37d0139 Mon Sep 17 00:00:00 2001 From: Bohdan Horbeshko Date: Sat, 15 Jul 2023 21:38:10 -0400 Subject: Do not ack with edited message to the XEP-0308 sender resource --- xmpp/handlers.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xmpp') diff --git a/xmpp/handlers.go b/xmpp/handlers.go index e6671bc..c5ec029 100644 --- a/xmpp/handlers.go +++ b/xmpp/handlers.go @@ -177,13 +177,14 @@ func HandleMessage(s xmpp.Sender, p stanza.Packet) { if err != nil { log.Errorf("Failed to replace id %v with %v %v", replace.Id, msg.Id, tgMessageId) } */ + session.AddToOutbox(replace.Id, resource) } else { err = gateway.IdsDB.Set(session.Session.Login, bare, toID, tgMessageId, msg.Id) if err != nil { log.Errorf("Failed to save ids %v/%v %v", toID, tgMessageId, msg.Id) } + session.AddToOutbox(msg.Id, resource) } - session.AddToOutbox(msg.Id, resource) } else { /* // if a message failed to edit on Telegram side, match new XMPP ID with old Telegram ID anyway -- cgit v1.2.3