diff options
| author | Marvin W <git@larma.de> | 2023-02-07 21:22:32 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-10-05 14:32:07 +0200 |
| commit | 7a325ebf90b5857b5119d45603d265959ff45bf9 (patch) | |
| tree | 6ceb3c82e56dad5e24a5fcb48ac157e0ebe4eddc | |
| parent | fb46755aec1d2c52dcb12bfc9714e26c84ec3d3d (diff) | |
Don't accept corrections from MUC MAM
We don't know if they're from the same user as someone else could have joined with the same nickname after sender left
| -rw-r--r-- | libdino/src/service/message_correction.vala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libdino/src/service/message_correction.vala b/libdino/src/service/message_correction.vala index 322fa1c1..998383c2 100644 --- a/libdino/src/service/message_correction.vala +++ b/libdino/src/service/message_correction.vala @@ -96,9 +96,10 @@ public class MessageCorrection : StreamInteractionModule, MessageListener { public override async bool run(Entities.Message message, Xmpp.MessageStanza stanza, Conversation conversation) { if (conversation.type_ != Conversation.Type.CHAT) { - // Don't process messages or corrections from MUC history + // Don't process messages or corrections from MUC history or MUC MAM DateTime? mam_delay = Xep.DelayedDelivery.get_time_for_message(stanza, message.from.bare_jid); if (mam_delay != null) return false; + if (Xmpp.MessageArchiveManagement.MessageFlag.get_flag(stanza) != null) return false; } string? replace_id = Xep.LastMessageCorrection.get_replace_id(stanza); |
