1
0
Fork 0

Do not check for unique `stanza-id` for MAM messages

Since we might have MAM messages already received earlier
it doesn't make sense to require unique stanza-ids there.
Fix https://github.com/profanity-im/profanity/issues/1925.
This commit is contained in:
John Hernandez 2023-11-11 17:12:48 +01:00
parent bba8278bb7
commit d3566b1203
1 changed files with 2 additions and 1 deletions

View File

@ -528,7 +528,8 @@ _add_to_db(ProfMessage* message, char* type, const Jid* const from_jid, const Ji
// stanza-id (XEP-0359) doesn't have to be present in the message.
// But if it's duplicated, it's a serious server-side problem, so we better track it.
if (message->stanzaid) {
// Unless it's MAM, in that case it's expected behaviour.
if (message->stanzaid && !message->is_mam) {
auto_sqlite char* duplicate_check_query = sqlite3_mprintf("SELECT 1 FROM `ChatLogs` WHERE (`archive_id` = %Q)",
message->stanzaid);