aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2023-02-07 21:22:32 +0100
committerMarvin W <git@larma.de>2023-02-07 21:36:33 +0100
commit9c5e36020d8997452d4fd07c5a153e1e7fc24088 (patch)
treefd4654c0c13efa5b208eb468078c125e4e618e2c
parent116682e311edca6665a0497c8b225b4fe69859a7 (diff)
downloaddino-9c5e36020d8997452d4fd07c5a153e1e7fc24088.tar.gz
dino-9c5e36020d8997452d4fd07c5a153e1e7fc24088.zip
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.vala3
1 files changed, 2 insertions, 1 deletions
diff --git a/libdino/src/service/message_correction.vala b/libdino/src/service/message_correction.vala
index 2c9078ea..8f9770d8 100644
--- a/libdino/src/service/message_correction.vala
+++ b/libdino/src/service/message_correction.vala
@@ -97,9 +97,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);