mirror of
https://github.com/TakeV-Lambda/dino.git
synced 2024-10-31 21:20:23 +00:00
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
This commit is contained in:
parent
116682e311
commit
9c5e36020d
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue