1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-09 21:30:42 +00:00

Merge pull request #1926 from H3rnand3zzz/fix/mam-dupe-stanza-id-flood

Do not check for unique `stanza-id` for MAM messages
This commit is contained in:
Michael Vetter 2023-11-13 09:41:06 +01:00 committed by GitHub
commit 740c209a0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);