mirror of
https://github.com/profanity-im/profanity.git
synced 2024-09-29 19:56:07 -04: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:
commit
740c209a0d
@ -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.
|
// 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.
|
// 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)",
|
auto_sqlite char* duplicate_check_query = sqlite3_mprintf("SELECT 1 FROM `ChatLogs` WHERE (`archive_id` = %Q)",
|
||||||
message->stanzaid);
|
message->stanzaid);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user