You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(muc): Prevent duplicate messages if MAM is enabled
When joining a MUC the local db history is loaded when the window is created.
Then the servers MAM response arrives including messages sent by the
ourselves in previous sessions.
The database layer correctly skips duplicate insertions.
But doesn't inform the caller that it skipped the insertion.
This caused the event handler to assume the replayed message was a
realtime message and render it a second time.
Signed-off-by: Michael Vetter <jubalh@iodoru.org>
log_error("Mismatch in sender JIDs when trying to do LMC. Corrected message sender: %s. Original message sender: %s. Replace-ID: %s. Message: %s", from_jid->barejid, from_jid_orig, message->replace_id, message->plain);
655
655
cons_show_error("%s sent a message correction with mismatched sender. See log for details.", from_jid->barejid);
656
656
sqlite3_finalize(lmc_stmt);
657
-
return;
657
+
return FALSE;
658
658
}
659
659
} else {
660
660
log_warning("Got LMC message that does not have original message counterpart in the database from %s", message->from_jid->fulljid);
0 commit comments