From ddf0b9f55308e558b5934b91d5b61905e07d9613 Mon Sep 17 00:00:00 2001 From: zjs81 Date: Sun, 8 Nov 2026 01:33:05 -0700 Subject: [PATCH] Fix false repeat flags, add repeat-sends setting, limit holiday animations Message filter: - Ignore copies of a message already seen (same sender, text and send second). Switching between companions re-synced messages the first one had delivered; they missed per-radio storage dedup and were flagged as repeats. - Exempt replies and @[name] mentions from repeat detection. - New "Sends to count as a repeat" setting (2-5, default 2). Each send must fall within 10 minutes of the previous one. - Translations for the new strings in all locales. Holiday animations: - Only one plays at a time; greetings arriving while one is playing or within 5 seconds after it ends are dropped, not queued. - Christmas map "self" marker: Santa hat was upside down. --- assets/themes/christmas/map_self.jxl | Bin 16057 -> 13770 bytes documentation/message-filter.md | 8 ++- documentation/themes.md | 1 + lib/connector/meshcore_connector.dart | 4 ++ lib/l10n/app_bg.arb | 2 + lib/l10n/app_cs.arb | 2 + lib/l10n/app_de.arb | 2 + lib/l10n/app_en.arb | 13 ++++ lib/l10n/app_es.arb | 2 + lib/l10n/app_fr.arb | 2 + lib/l10n/app_hu.arb | 2 + lib/l10n/app_it.arb | 2 + lib/l10n/app_ja.arb | 2 + lib/l10n/app_ko.arb | 2 + lib/l10n/app_localizations.dart | 12 ++++ lib/l10n/app_localizations_bg.dart | 8 +++ lib/l10n/app_localizations_cs.dart | 8 +++ lib/l10n/app_localizations_de.dart | 8 +++ lib/l10n/app_localizations_en.dart | 8 +++ lib/l10n/app_localizations_es.dart | 8 +++ lib/l10n/app_localizations_fr.dart | 8 +++ lib/l10n/app_localizations_hu.dart | 8 +++ lib/l10n/app_localizations_it.dart | 8 +++ lib/l10n/app_localizations_ja.dart | 8 +++ lib/l10n/app_localizations_ko.dart | 8 +++ lib/l10n/app_localizations_nl.dart | 9 +++ lib/l10n/app_localizations_pl.dart | 8 +++ lib/l10n/app_localizations_pt.dart | 8 +++ lib/l10n/app_localizations_ru.dart | 8 +++ lib/l10n/app_localizations_sk.dart | 8 +++ lib/l10n/app_localizations_sl.dart | 8 +++ lib/l10n/app_localizations_sv.dart | 8 +++ lib/l10n/app_localizations_uk.dart | 8 +++ lib/l10n/app_localizations_zh.dart | 8 +++ lib/l10n/app_nl.arb | 2 + lib/l10n/app_pl.arb | 2 + lib/l10n/app_pt.arb | 2 + lib/l10n/app_ru.arb | 2 + lib/l10n/app_sk.arb | 2 + lib/l10n/app_sl.arb | 2 + lib/l10n/app_sv.arb | 2 + lib/l10n/app_uk.arb | 2 + lib/l10n/app_zh.arb | 2 + lib/models/message_filter.dart | 17 +++++ .../message_filter_settings_screen.dart | 30 ++++++++ .../message_filter/duplicate_tracker.dart | 66 +++++++++++++++--- .../message_filter_service.dart | 23 ++++-- .../message_filter/message_filter_text.dart | 3 + lib/widgets/holiday_animations.dart | 45 +++++++++++- test/helpers/holiday_triggers_test.dart | 41 +++++++++++ .../duplicate_tracker_test.dart | 50 +++++++++++++ .../message_filter_service_test.dart | 48 ++++++++++++- 52 files changed, 526 insertions(+), 24 deletions(-) diff --git a/assets/themes/christmas/map_self.jxl b/assets/themes/christmas/map_self.jxl index 5c5ac7deb78d295f83c45a73490a9775636b80ef..ee6dfe7f329adc48db3075ac9633802a20ae2138 100644 GIT binary patch literal 13770 zcmV;*H8slr3SYoV2mlZO{l+W#1B?{#f-@9@(|{d)RVrfef9Mm`pfOgjBLwZVB@M2? zzZJ=@DNG1HIuwg8e5$CaW^h#-b(f&3wF_#yUDjA+Ya;-q;l2(DT#4{V+tWmHjS%P( z^1f8Q%pWEy0=Y&FVZ_J9N4~+u9v)SMKJlV2TO(tkkIE$-)$B3KMQ1UG#6lbtIfx%e z^U)!C3diig0Ob00>cP1|ifC%z#yFa7r$*PstOgO%Eyt zW)O68Poym3RAk6&`@pa~AF+63-S8mXZ6RpKTHT50T-~e-=Q~LmLmcM1bV<8Bz~M zID_;E0AYQ)7?Tuwf*~ZNVU$=m05)|KFWy`j(yL%aNwQrysI6iqD;1$pv&mu17%wMI zoH&_rZcEW4P+S-rd(ly5rRUv|yu4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=6splCGP?RY#$X zNHvQc+QaX<8c$?TA-_ecnOYHw!F{MQ0M8izkSWk<2|kyg4o$Ua#-SUory go_MG@m)TA1`n#<{VibAraomL=yu2+4cLMhR0K31<1^@s6 diff --git a/documentation/message-filter.md b/documentation/message-filter.md index 072896eb..9416f791 100644 --- a/documentation/message-filter.md +++ b/documentation/message-filter.md @@ -27,8 +27,9 @@ The message is then checked in this order. The first check that matches decides, 2. **Text rule**: one of your rules matches the message text. 3. **Repeated characters** (automatic): one character repeated 20 or more times in a row, such as "aaaaaaaaaaaaaaaaaaaa". Digits and spaces don't count, so long numbers (frequencies, coordinates) are safe. Shorter runs, like "Noooooooo!", a `--------` separator or a row of emoji, are ordinary chat and are left alone. 4. **Repeated messages** (automatic): - - The **same sender** sends the same message again within 10 minutes. This only applies to messages of at least 3 words and 10 characters, because people naturally repeat short replies such as "ok", "yes" or "test". + - The **same sender** sends the same message again, each send within 10 minutes of the previous one. By default the second send is caught; **Sends to count as a repeat** (2–5) lets people re-send a few times first, for example when they see no repeat or reply. This only applies to messages of at least 3 words and 10 characters, because people naturally repeat short replies such as "ok", "yes" or "test". - The **same text from 3 or more different senders** within 30 minutes. This only applies to longer messages, at least 10 characters and at least 6 words, so short greetings such as "Happy New Year!" are never caught. + - Replies and messages that mention someone (`@[name]`) are never checked for repeats, so asking several people the same question is fine. 5. **Learned from your Spam taps** (automatic): a small classifier scores how much the message looks like the messages you marked as spam (see below). It needs at least 2 messages marked as spam, and it hides a message only when it is at least 80% confident. ### Matching text @@ -37,12 +38,12 @@ Before comparing, both your rule and the message are normalised: - Capital letters, accents and zero-width (invisible) characters are ignored. - Look-alike letters are treated as the letter they imitate: Cyrillic or Greek letters that look Latin, fullwidth letters, and "styled" letters such as 𝐛𝐨𝐥𝐝 or 𝘪𝘵𝘢𝘭𝘪𝘤. Swapping in look-alike letters doesn't get a message past a rule. -- Repeated-message checks also ignore punctuation, emoji and `@[name]` mentions, so "Meet at the park!" and "meet at the park" count as the same text. +- Repeated-message checks also ignore punctuation and emoji, so "Meet at the park!" and "meet at the park" count as the same text. - A reply's leading `@[name]` mention is not part of the text that is checked. ### Repeated-message memory -The app keeps a short in-memory list of recent messages for each channel: up to 1,000 per channel, for 30 minutes. Each new message is compared against it. Every checked message is added, including ones a rule already hid, so a flood keeps being caught even after you add a rule for part of it. +The app keeps a short in-memory list of recent messages for each channel: up to 1,000 per channel, for 30 minutes. Each new message is compared against it. A message with the same sender, text and send time as one already in the list is the same message seen again (for example, synced again when you connect a different companion) and never counts as a repeat. Every checked message is added, including ones a rule already hid, so a flood keeps being caught even after you add a rule for part of it. Time windows use the time the message was **sent**, not when it reached your phone. History synced in a burst after you reconnect was sent hours apart, so it is not mistaken for a flood. Old entries are forgotten by the time they *arrived*, so a sender with a wrong clock can't push everyone else out of the list. @@ -109,6 +110,7 @@ Other effects of filtering: | **Show a small placeholder** / **Hide completely** | Placeholder | How filtered messages appear in chat. | | **Your rules** | None | Your own rules (see above). | | **Repeated messages** | On | "The same message sent again, or by several senders". | +| **Sends to count as a repeat** | 2 | Which send of the same message by the same sender is hidden (2–5). Available while Repeated messages is on. | | **Repeated characters** | On | Long runs of one character, like "aaaaaaaaaaaaaaaaaaaa". | | **Learn from Spam taps** | On | Shows how many "spam and not-spam examples" the app is using. | | **Reset learning** | | Asks for confirmation, then forgets everything learned from your Spam and Not spam taps. Your rules are kept. | diff --git a/documentation/themes.md b/documentation/themes.md index cf882766..95307ec1 100644 --- a/documentation/themes.md +++ b/documentation/themes.md @@ -99,5 +99,6 @@ When a new message containing a holiday greeting arrives in, or is sent from, th - Only new messages play; messages already in the chat when you open it, and synced messages more than 2 minutes old, stay quiet. - Animations play any day of the year, not only during the holiday windows. +- Only one animation plays at a time. A greeting that arrives while one is playing, or within 5 seconds after it ends, is skipped (not queued), so a burst of greetings plays once. - Touches pass through the animation. - Turn them off with **App Settings → Appearance → Holiday message animations**. They are also skipped when the system's reduce-motion / remove-animations setting is on. diff --git a/lib/connector/meshcore_connector.dart b/lib/connector/meshcore_connector.dart index b79ac686..257a5fb2 100644 --- a/lib/connector/meshcore_connector.dart +++ b/lib/connector/meshcore_connector.dart @@ -1110,6 +1110,10 @@ class MeshCoreConnector extends ChangeNotifier { // after reconnecting arrives in a burst but was sent spread out. sentAt: message.timestamp, isReaction: message.parseReaction() != null, + // The reply mention may already be stripped into reply metadata. + isReply: + message.replyToSenderName != null || + ChannelMessage.parseReplyMention(message.text) != null, ); return applyFilterVerdict(message, verdict); } diff --git a/lib/l10n/app_bg.arb b/lib/l10n/app_bg.arb index e52c88ee..160c1d4d 100644 --- a/lib/l10n/app_bg.arb +++ b/lib/l10n/app_bg.arb @@ -3563,6 +3563,8 @@ "messageFilter_automaticSection": "Автоматично", "messageFilter_duplicates": "Повтарящи се съобщения", "messageFilter_duplicatesSubtitle": "Същото съобщение, изпратено отново или от няколко подателя", + "messageFilter_repeatSends": "Изпращания, броени за повторение", + "messageFilter_repeatSendsSubtitle": "Скриване на съобщение, когато същият подател го изпрати {count} пъти в рамките на 10 минути", "messageFilter_repeatedCharacters": "Повтарящи се символи", "messageFilter_repeatedCharactersSubtitle": "Дълги поредици от един и същ знак, като „aaaaaaaaaaaaaaaaaaaa“", "messageFilter_learning": "Учи се от натискането на „Спам“", diff --git a/lib/l10n/app_cs.arb b/lib/l10n/app_cs.arb index b78a9eee..e6afdc10 100644 --- a/lib/l10n/app_cs.arb +++ b/lib/l10n/app_cs.arb @@ -4117,6 +4117,8 @@ "messageFilter_automaticSection": "Automatické", "messageFilter_duplicates": "Opakované zprávy", "messageFilter_duplicatesSubtitle": "Stejná zpráva odeslaná znovu nebo více odesílateli", + "messageFilter_repeatSends": "Počet odeslání pro opakování", + "messageFilter_repeatSendsSubtitle": "Skrýt zprávu, když ji stejný odesílatel odešle {count}× během 10 minut", "messageFilter_repeatedCharacters": "Opakované znaky", "messageFilter_repeatedCharactersSubtitle": "Dlouhé řady jednoho znaku, například \"aaaaaaaaaaaaaaaaaaaa\"", "messageFilter_learning": "Učit se z klepnutí na Spam", diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb index 1e61aa6b..c1494418 100644 --- a/lib/l10n/app_de.arb +++ b/lib/l10n/app_de.arb @@ -3698,6 +3698,8 @@ "messageFilter_automaticSection": "Automatisch", "messageFilter_duplicates": "Wiederholte Nachrichten", "messageFilter_duplicatesSubtitle": "Dieselbe Nachricht erneut gesendet oder von mehreren Absendern", + "messageFilter_repeatSends": "Sendungen bis zur Wiederholung", + "messageFilter_repeatSendsSubtitle": "Nachricht ausblenden, wenn derselbe Absender sie innerhalb von 10 Minuten {count}-mal sendet", "messageFilter_repeatedCharacters": "Wiederholte Zeichen", "messageFilter_repeatedCharactersSubtitle": "Lange Folgen desselben Zeichens, z. B. „aaaaaaaaaaaaaaaaaaaa“", "messageFilter_learning": "Aus Spam-Markierungen lernen", diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index c528ce51..cd3a46c6 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -3958,6 +3958,19 @@ "@messageFilter_duplicatesSubtitle": { "description": "Message filter: The same message sent again, or by several senders" }, + "messageFilter_repeatSends": "Sends to count as a repeat", + "@messageFilter_repeatSends": { + "description": "Message filter: title of the setting for which send of the same message by the same sender is hidden as a repeat" + }, + "messageFilter_repeatSendsSubtitle": "Hide a message when the same sender sends it {count} times within 10 minutes", + "@messageFilter_repeatSendsSubtitle": { + "description": "Message filter: subtitle of the repeat-sends setting", + "placeholders": { + "count": { + "type": "int" + } + } + }, "messageFilter_repeatedCharacters": "Repeated characters", "@messageFilter_repeatedCharacters": { "description": "Message filter: Repeated characters" diff --git a/lib/l10n/app_es.arb b/lib/l10n/app_es.arb index 29c3d693..ec2b8dda 100644 --- a/lib/l10n/app_es.arb +++ b/lib/l10n/app_es.arb @@ -3697,6 +3697,8 @@ "messageFilter_automaticSection": "Automático", "messageFilter_duplicates": "Mensajes repetidos", "messageFilter_duplicatesSubtitle": "El mismo mensaje enviado de nuevo, o por varios remitentes", + "messageFilter_repeatSends": "Envíos para contar como repetición", + "messageFilter_repeatSendsSubtitle": "Ocultar un mensaje cuando el mismo remitente lo envía {count} veces en 10 minutos", "messageFilter_repeatedCharacters": "Caracteres repetidos", "messageFilter_repeatedCharactersSubtitle": "Secuencias largas de un mismo carácter, como \"aaaaaaaaaaaaaaaaaaaa\"", "messageFilter_learning": "Aprender de los toques en Spam", diff --git a/lib/l10n/app_fr.arb b/lib/l10n/app_fr.arb index 2b6a68ae..de82eb66 100644 --- a/lib/l10n/app_fr.arb +++ b/lib/l10n/app_fr.arb @@ -3697,6 +3697,8 @@ "messageFilter_automaticSection": "Automatique", "messageFilter_duplicates": "Messages répétés", "messageFilter_duplicatesSubtitle": "Le même message envoyé de nouveau, ou par plusieurs expéditeurs", + "messageFilter_repeatSends": "Envois comptés comme répétition", + "messageFilter_repeatSendsSubtitle": "Masquer un message lorsque le même expéditeur l'envoie {count} fois en 10 minutes", "messageFilter_repeatedCharacters": "Caractères répétés", "messageFilter_repeatedCharactersSubtitle": "Longues séquences d'un même caractère, comme « aaaaaaaaaaaaaaaaaaaa »", "messageFilter_learning": "Apprendre des appuis sur Spam", diff --git a/lib/l10n/app_hu.arb b/lib/l10n/app_hu.arb index a786058c..f9a00c2a 100644 --- a/lib/l10n/app_hu.arb +++ b/lib/l10n/app_hu.arb @@ -3602,6 +3602,8 @@ "messageFilter_automaticSection": "Automatikus", "messageFilter_duplicates": "Ismétlődő üzenetek", "messageFilter_duplicatesSubtitle": "Ugyanaz az üzenet újra elküldve, vagy több feladótól", + "messageFilter_repeatSends": "Ismétlésnek számító küldések", + "messageFilter_repeatSendsSubtitle": "Üzenet elrejtése, ha ugyanaz a feladó {count}× elküldi 10 percen belül", "messageFilter_repeatedCharacters": "Ismétlődő karakterek", "messageFilter_repeatedCharactersSubtitle": "Ugyanazon karakter hosszú sorozata, például „aaaaaaaaaaaaaaaaaaaa”", "messageFilter_learning": "Tanulás a Spam gombokból", diff --git a/lib/l10n/app_it.arb b/lib/l10n/app_it.arb index 9cfba865..85bb2a02 100644 --- a/lib/l10n/app_it.arb +++ b/lib/l10n/app_it.arb @@ -3697,6 +3697,8 @@ "messageFilter_automaticSection": "Automatico", "messageFilter_duplicates": "Messaggi ripetuti", "messageFilter_duplicatesSubtitle": "Lo stesso messaggio inviato di nuovo, o da più mittenti", + "messageFilter_repeatSends": "Invii da considerare ripetizione", + "messageFilter_repeatSendsSubtitle": "Nascondi un messaggio quando lo stesso mittente lo invia {count} volte entro 10 minuti", "messageFilter_repeatedCharacters": "Caratteri ripetuti", "messageFilter_repeatedCharactersSubtitle": "Lunghe sequenze dello stesso carattere, come «aaaaaaaaaaaaaaaaaaaa»", "messageFilter_learning": "Impara dai tocchi su Spam", diff --git a/lib/l10n/app_ja.arb b/lib/l10n/app_ja.arb index cf67e6a4..bf0b6b1f 100644 --- a/lib/l10n/app_ja.arb +++ b/lib/l10n/app_ja.arb @@ -3778,6 +3778,8 @@ "@messageFilter_duplicatesSubtitle": { "description": "Message filter: The same message sent again, or by several senders" }, + "messageFilter_repeatSends": "繰り返しと見なす送信回数", + "messageFilter_repeatSendsSubtitle": "同じ送信者が10分以内に同じメッセージを{count}回送信したら非表示にします", "messageFilter_repeatedCharacters": "繰り返しの文字", "@messageFilter_repeatedCharacters": { "description": "Message filter: Repeated characters" diff --git a/lib/l10n/app_ko.arb b/lib/l10n/app_ko.arb index b3e4f8aa..7a8f7e29 100644 --- a/lib/l10n/app_ko.arb +++ b/lib/l10n/app_ko.arb @@ -3778,6 +3778,8 @@ "@messageFilter_duplicatesSubtitle": { "description": "Message filter: The same message sent again, or by several senders" }, + "messageFilter_repeatSends": "반복으로 간주할 전송 횟수", + "messageFilter_repeatSendsSubtitle": "같은 발신자가 10분 안에 같은 메시지를 {count}번 보내면 숨깁니다", "messageFilter_repeatedCharacters": "반복된 문자", "@messageFilter_repeatedCharacters": { "description": "Message filter: Repeated characters" diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index a42e4484..6d6ceaf5 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -11889,6 +11889,18 @@ abstract class AppLocalizations { /// **'The same message sent again, or by several senders'** String get messageFilter_duplicatesSubtitle; + /// Message filter: title of the setting for which send of the same message by the same sender is hidden as a repeat + /// + /// In en, this message translates to: + /// **'Sends to count as a repeat'** + String get messageFilter_repeatSends; + + /// Message filter: subtitle of the repeat-sends setting + /// + /// In en, this message translates to: + /// **'Hide a message when the same sender sends it {count} times within 10 minutes'** + String messageFilter_repeatSendsSubtitle(int count); + /// Message filter: Repeated characters /// /// In en, this message translates to: diff --git a/lib/l10n/app_localizations_bg.dart b/lib/l10n/app_localizations_bg.dart index f5b8ae90..57f0c5bb 100644 --- a/lib/l10n/app_localizations_bg.dart +++ b/lib/l10n/app_localizations_bg.dart @@ -7087,6 +7087,14 @@ class AppLocalizationsBg extends AppLocalizations { String get messageFilter_duplicatesSubtitle => 'Същото съобщение, изпратено отново или от няколко подателя'; + @override + String get messageFilter_repeatSends => 'Изпращания, броени за повторение'; + + @override + String messageFilter_repeatSendsSubtitle(int count) { + return 'Скриване на съобщение, когато същият подател го изпрати $count пъти в рамките на 10 минути'; + } + @override String get messageFilter_repeatedCharacters => 'Повтарящи се символи'; diff --git a/lib/l10n/app_localizations_cs.dart b/lib/l10n/app_localizations_cs.dart index 01e37b3a..993370b1 100644 --- a/lib/l10n/app_localizations_cs.dart +++ b/lib/l10n/app_localizations_cs.dart @@ -7053,6 +7053,14 @@ class AppLocalizationsCs extends AppLocalizations { String get messageFilter_duplicatesSubtitle => 'Stejná zpráva odeslaná znovu nebo více odesílateli'; + @override + String get messageFilter_repeatSends => 'Počet odeslání pro opakování'; + + @override + String messageFilter_repeatSendsSubtitle(int count) { + return 'Skrýt zprávu, když ji stejný odesílatel odešle $count× během 10 minut'; + } + @override String get messageFilter_repeatedCharacters => 'Opakované znaky'; diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart index c3f77622..6bf8cde5 100644 --- a/lib/l10n/app_localizations_de.dart +++ b/lib/l10n/app_localizations_de.dart @@ -7098,6 +7098,14 @@ class AppLocalizationsDe extends AppLocalizations { String get messageFilter_duplicatesSubtitle => 'Dieselbe Nachricht erneut gesendet oder von mehreren Absendern'; + @override + String get messageFilter_repeatSends => 'Sendungen bis zur Wiederholung'; + + @override + String messageFilter_repeatSendsSubtitle(int count) { + return 'Nachricht ausblenden, wenn derselbe Absender sie innerhalb von 10 Minuten $count-mal sendet'; + } + @override String get messageFilter_repeatedCharacters => 'Wiederholte Zeichen'; diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index 841a22ee..5a2ffe14 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -6982,6 +6982,14 @@ class AppLocalizationsEn extends AppLocalizations { String get messageFilter_duplicatesSubtitle => 'The same message sent again, or by several senders'; + @override + String get messageFilter_repeatSends => 'Sends to count as a repeat'; + + @override + String messageFilter_repeatSendsSubtitle(int count) { + return 'Hide a message when the same sender sends it $count times within 10 minutes'; + } + @override String get messageFilter_repeatedCharacters => 'Repeated characters'; diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart index 64a0ddec..c7cf495a 100644 --- a/lib/l10n/app_localizations_es.dart +++ b/lib/l10n/app_localizations_es.dart @@ -7084,6 +7084,14 @@ class AppLocalizationsEs extends AppLocalizations { String get messageFilter_duplicatesSubtitle => 'El mismo mensaje enviado de nuevo, o por varios remitentes'; + @override + String get messageFilter_repeatSends => 'Envíos para contar como repetición'; + + @override + String messageFilter_repeatSendsSubtitle(int count) { + return 'Ocultar un mensaje cuando el mismo remitente lo envía $count veces en 10 minutos'; + } + @override String get messageFilter_repeatedCharacters => 'Caracteres repetidos'; diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart index e4016dc9..5af8327d 100644 --- a/lib/l10n/app_localizations_fr.dart +++ b/lib/l10n/app_localizations_fr.dart @@ -7110,6 +7110,14 @@ class AppLocalizationsFr extends AppLocalizations { String get messageFilter_duplicatesSubtitle => 'Le même message envoyé de nouveau, ou par plusieurs expéditeurs'; + @override + String get messageFilter_repeatSends => 'Envois comptés comme répétition'; + + @override + String messageFilter_repeatSendsSubtitle(int count) { + return 'Masquer un message lorsque le même expéditeur l\'envoie $count fois en 10 minutes'; + } + @override String get messageFilter_repeatedCharacters => 'Caractères répétés'; diff --git a/lib/l10n/app_localizations_hu.dart b/lib/l10n/app_localizations_hu.dart index 9ee118d7..e79d8376 100644 --- a/lib/l10n/app_localizations_hu.dart +++ b/lib/l10n/app_localizations_hu.dart @@ -7073,6 +7073,14 @@ class AppLocalizationsHu extends AppLocalizations { String get messageFilter_duplicatesSubtitle => 'Ugyanaz az üzenet újra elküldve, vagy több feladótól'; + @override + String get messageFilter_repeatSends => 'Ismétlésnek számító küldések'; + + @override + String messageFilter_repeatSendsSubtitle(int count) { + return 'Üzenet elrejtése, ha ugyanaz a feladó $count× elküldi 10 percen belül'; + } + @override String get messageFilter_repeatedCharacters => 'Ismétlődő karakterek'; diff --git a/lib/l10n/app_localizations_it.dart b/lib/l10n/app_localizations_it.dart index 5bac30cf..8a81f63f 100644 --- a/lib/l10n/app_localizations_it.dart +++ b/lib/l10n/app_localizations_it.dart @@ -7094,6 +7094,14 @@ class AppLocalizationsIt extends AppLocalizations { String get messageFilter_duplicatesSubtitle => 'Lo stesso messaggio inviato di nuovo, o da più mittenti'; + @override + String get messageFilter_repeatSends => 'Invii da considerare ripetizione'; + + @override + String messageFilter_repeatSendsSubtitle(int count) { + return 'Nascondi un messaggio quando lo stesso mittente lo invia $count volte entro 10 minuti'; + } + @override String get messageFilter_repeatedCharacters => 'Caratteri ripetuti'; diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart index 8017eeb1..8d3b4601 100644 --- a/lib/l10n/app_localizations_ja.dart +++ b/lib/l10n/app_localizations_ja.dart @@ -6758,6 +6758,14 @@ class AppLocalizationsJa extends AppLocalizations { String get messageFilter_duplicatesSubtitle => '同じメッセージが再送されたり、複数の送信者から届いたりしたもの'; + @override + String get messageFilter_repeatSends => '繰り返しと見なす送信回数'; + + @override + String messageFilter_repeatSendsSubtitle(int count) { + return '同じ送信者が10分以内に同じメッセージを$count回送信したら非表示にします'; + } + @override String get messageFilter_repeatedCharacters => '繰り返しの文字'; diff --git a/lib/l10n/app_localizations_ko.dart b/lib/l10n/app_localizations_ko.dart index 4cf017ce..c18c5fe3 100644 --- a/lib/l10n/app_localizations_ko.dart +++ b/lib/l10n/app_localizations_ko.dart @@ -6766,6 +6766,14 @@ class AppLocalizationsKo extends AppLocalizations { String get messageFilter_duplicatesSubtitle => '같은 메시지를 다시 보냈거나 여러 발신자가 보낸 경우'; + @override + String get messageFilter_repeatSends => '반복으로 간주할 전송 횟수'; + + @override + String messageFilter_repeatSendsSubtitle(int count) { + return '같은 발신자가 10분 안에 같은 메시지를 $count번 보내면 숨깁니다'; + } + @override String get messageFilter_repeatedCharacters => '반복된 문자'; diff --git a/lib/l10n/app_localizations_nl.dart b/lib/l10n/app_localizations_nl.dart index 89830e91..e1d30f94 100644 --- a/lib/l10n/app_localizations_nl.dart +++ b/lib/l10n/app_localizations_nl.dart @@ -7048,6 +7048,15 @@ class AppLocalizationsNl extends AppLocalizations { String get messageFilter_duplicatesSubtitle => 'Hetzelfde bericht opnieuw verstuurd, of door meerdere afzenders'; + @override + String get messageFilter_repeatSends => + 'Verzendingen die als herhaling tellen'; + + @override + String messageFilter_repeatSendsSubtitle(int count) { + return 'Verberg een bericht wanneer dezelfde afzender het $count keer verstuurt binnen 10 minuten'; + } + @override String get messageFilter_repeatedCharacters => 'Herhaalde tekens'; diff --git a/lib/l10n/app_localizations_pl.dart b/lib/l10n/app_localizations_pl.dart index 39e18cad..62d38fd0 100644 --- a/lib/l10n/app_localizations_pl.dart +++ b/lib/l10n/app_localizations_pl.dart @@ -7112,6 +7112,14 @@ class AppLocalizationsPl extends AppLocalizations { String get messageFilter_duplicatesSubtitle => 'Ta sama wiadomość wysłana ponownie lub przez kilku nadawców'; + @override + String get messageFilter_repeatSends => 'Liczba wysłań uznawana za powtórkę'; + + @override + String messageFilter_repeatSendsSubtitle(int count) { + return 'Ukryj wiadomość, gdy ten sam nadawca wyśle ją w ciągu 10 minut tyle razy: $count'; + } + @override String get messageFilter_repeatedCharacters => 'Powtarzające się znaki'; diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart index 8a4a1746..ef5fe24b 100644 --- a/lib/l10n/app_localizations_pt.dart +++ b/lib/l10n/app_localizations_pt.dart @@ -7076,6 +7076,14 @@ class AppLocalizationsPt extends AppLocalizations { String get messageFilter_duplicatesSubtitle => 'A mesma mensagem enviada de novo, ou por vários remetentes'; + @override + String get messageFilter_repeatSends => 'Envios que contam como repetição'; + + @override + String messageFilter_repeatSendsSubtitle(int count) { + return 'Ocultar uma mensagem quando o mesmo remetente a envia $count vezes em 10 minutos'; + } + @override String get messageFilter_repeatedCharacters => 'Caracteres repetidos'; diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart index ec63c701..255ee4fa 100644 --- a/lib/l10n/app_localizations_ru.dart +++ b/lib/l10n/app_localizations_ru.dart @@ -7099,6 +7099,14 @@ class AppLocalizationsRu extends AppLocalizations { String get messageFilter_duplicatesSubtitle => 'Одно и то же сообщение, отправленное снова или несколькими отправителями'; + @override + String get messageFilter_repeatSends => 'Отправка, считающаяся повтором'; + + @override + String messageFilter_repeatSendsSubtitle(int count) { + return 'Скрывать сообщение, если один отправитель отправляет его повторно в течение 10 минут (число отправок: $count)'; + } + @override String get messageFilter_repeatedCharacters => 'Повторяющиеся символы'; diff --git a/lib/l10n/app_localizations_sk.dart b/lib/l10n/app_localizations_sk.dart index fbf65869..2b2fe46b 100644 --- a/lib/l10n/app_localizations_sk.dart +++ b/lib/l10n/app_localizations_sk.dart @@ -7067,6 +7067,14 @@ class AppLocalizationsSk extends AppLocalizations { String get messageFilter_duplicatesSubtitle => 'Rovnaká správa odoslaná znova alebo viacerými odosielateľmi'; + @override + String get messageFilter_repeatSends => 'Odoslanie počítané ako opakovanie'; + + @override + String messageFilter_repeatSendsSubtitle(int count) { + return 'Skryť správu, ak ju ten istý odosielateľ pošle opakovane do 10 minút (počet odoslaní: $count)'; + } + @override String get messageFilter_repeatedCharacters => 'Opakované znaky'; diff --git a/lib/l10n/app_localizations_sl.dart b/lib/l10n/app_localizations_sl.dart index b476c0d1..259b492e 100644 --- a/lib/l10n/app_localizations_sl.dart +++ b/lib/l10n/app_localizations_sl.dart @@ -7053,6 +7053,14 @@ class AppLocalizationsSl extends AppLocalizations { String get messageFilter_duplicatesSubtitle => 'Isto sporočilo, poslano znova ali od več pošiljateljev'; + @override + String get messageFilter_repeatSends => 'Pošiljanje, šteto kot ponovitev'; + + @override + String messageFilter_repeatSendsSubtitle(int count) { + return 'Skrij sporočilo, ko ga isti pošiljatelj v 10 minutah pošlje ponovno (število pošiljanj: $count)'; + } + @override String get messageFilter_repeatedCharacters => 'Ponavljajoči se znaki'; diff --git a/lib/l10n/app_localizations_sv.dart b/lib/l10n/app_localizations_sv.dart index c60a0786..3d1eea20 100644 --- a/lib/l10n/app_localizations_sv.dart +++ b/lib/l10n/app_localizations_sv.dart @@ -7023,6 +7023,14 @@ class AppLocalizationsSv extends AppLocalizations { String get messageFilter_duplicatesSubtitle => 'Samma meddelande skickas igen, eller av flera avsändare'; + @override + String get messageFilter_repeatSends => 'Utskick som räknas som upprepning'; + + @override + String messageFilter_repeatSendsSubtitle(int count) { + return 'Dölj ett meddelande när samma avsändare skickar det $count gånger inom 10 minuter'; + } + @override String get messageFilter_repeatedCharacters => 'Upprepade tecken'; diff --git a/lib/l10n/app_localizations_uk.dart b/lib/l10n/app_localizations_uk.dart index 493ef29f..4d4a91ad 100644 --- a/lib/l10n/app_localizations_uk.dart +++ b/lib/l10n/app_localizations_uk.dart @@ -7107,6 +7107,14 @@ class AppLocalizationsUk extends AppLocalizations { String get messageFilter_duplicatesSubtitle => 'Те саме повідомлення, надіслане знову або кількома відправниками'; + @override + String get messageFilter_repeatSends => 'Яка відправка вважається повтором'; + + @override + String messageFilter_repeatSendsSubtitle(int count) { + return 'Приховувати повідомлення, якщо той самий відправник надсилає його повторно протягом 10 хвилин (кількість відправлень: $count)'; + } + @override String get messageFilter_repeatedCharacters => 'Повторювані символи'; diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart index 29d7811a..65264a5d 100644 --- a/lib/l10n/app_localizations_zh.dart +++ b/lib/l10n/app_localizations_zh.dart @@ -6602,6 +6602,14 @@ class AppLocalizationsZh extends AppLocalizations { @override String get messageFilter_duplicatesSubtitle => '重复发送的相同消息,或多个发送者发送的相同消息'; + @override + String get messageFilter_repeatSends => '视为重复的发送次数'; + + @override + String messageFilter_repeatSendsSubtitle(int count) { + return '同一发送者在 10 分钟内发送同一消息 $count 次时隐藏该消息'; + } + @override String get messageFilter_repeatedCharacters => '重复字符'; diff --git a/lib/l10n/app_nl.arb b/lib/l10n/app_nl.arb index fa0f4f26..68f83542 100644 --- a/lib/l10n/app_nl.arb +++ b/lib/l10n/app_nl.arb @@ -3464,6 +3464,8 @@ "messageFilter_automaticSection": "Automatisch", "messageFilter_duplicates": "Herhaalde berichten", "messageFilter_duplicatesSubtitle": "Hetzelfde bericht opnieuw verstuurd, of door meerdere afzenders", + "messageFilter_repeatSends": "Verzendingen die als herhaling tellen", + "messageFilter_repeatSendsSubtitle": "Verberg een bericht wanneer dezelfde afzender het {count} keer verstuurt binnen 10 minuten", "messageFilter_repeatedCharacters": "Herhaalde tekens", "messageFilter_repeatedCharactersSubtitle": "Lange reeksen van hetzelfde teken, zoals „aaaaaaaaaaaaaaaaaaaa”", "messageFilter_learning": "Leren van Spam-tikken", diff --git a/lib/l10n/app_pl.arb b/lib/l10n/app_pl.arb index 3828b5c7..d43d534b 100644 --- a/lib/l10n/app_pl.arb +++ b/lib/l10n/app_pl.arb @@ -3677,6 +3677,8 @@ "@messageFilter_duplicatesSubtitle": { "description": "Message filter: The same message sent again, or by several senders" }, + "messageFilter_repeatSends": "Liczba wysłań uznawana za powtórkę", + "messageFilter_repeatSendsSubtitle": "Ukryj wiadomość, gdy ten sam nadawca wyśle ją w ciągu 10 minut tyle razy: {count}", "messageFilter_repeatedCharacters": "Powtarzające się znaki", "@messageFilter_repeatedCharacters": { "description": "Message filter: Repeated characters" diff --git a/lib/l10n/app_pt.arb b/lib/l10n/app_pt.arb index f55670df..56168c3f 100644 --- a/lib/l10n/app_pt.arb +++ b/lib/l10n/app_pt.arb @@ -3563,6 +3563,8 @@ "messageFilter_automaticSection": "Automático", "messageFilter_duplicates": "Mensagens repetidas", "messageFilter_duplicatesSubtitle": "A mesma mensagem enviada de novo, ou por vários remetentes", + "messageFilter_repeatSends": "Envios que contam como repetição", + "messageFilter_repeatSendsSubtitle": "Ocultar uma mensagem quando o mesmo remetente a envia {count} vezes em 10 minutos", "messageFilter_repeatedCharacters": "Caracteres repetidos", "messageFilter_repeatedCharactersSubtitle": "Sequências longas de um mesmo caractere, como \"aaaaaaaaaaaaaaaaaaaa\"", "messageFilter_learning": "Aprender com os toques em Spam", diff --git a/lib/l10n/app_ru.arb b/lib/l10n/app_ru.arb index d385a651..c8890b14 100644 --- a/lib/l10n/app_ru.arb +++ b/lib/l10n/app_ru.arb @@ -2860,6 +2860,8 @@ "messageFilter_automaticSection": "Автоматически", "messageFilter_duplicates": "Повторяющиеся сообщения", "messageFilter_duplicatesSubtitle": "Одно и то же сообщение, отправленное снова или несколькими отправителями", + "messageFilter_repeatSends": "Отправка, считающаяся повтором", + "messageFilter_repeatSendsSubtitle": "Скрывать сообщение, если один отправитель отправляет его повторно в течение 10 минут (число отправок: {count})", "messageFilter_repeatedCharacters": "Повторяющиеся символы", "messageFilter_repeatedCharactersSubtitle": "Длинные последовательности одного символа, например «aaaaaaaaaaaaaaaaaaaa»", "messageFilter_learning": "Учиться на нажатиях «Спам»", diff --git a/lib/l10n/app_sk.arb b/lib/l10n/app_sk.arb index d9b36e3f..804862d2 100644 --- a/lib/l10n/app_sk.arb +++ b/lib/l10n/app_sk.arb @@ -3564,6 +3564,8 @@ "messageFilter_automaticSection": "Automatické", "messageFilter_duplicates": "Opakované správy", "messageFilter_duplicatesSubtitle": "Rovnaká správa odoslaná znova alebo viacerými odosielateľmi", + "messageFilter_repeatSends": "Odoslanie počítané ako opakovanie", + "messageFilter_repeatSendsSubtitle": "Skryť správu, ak ju ten istý odosielateľ pošle opakovane do 10 minút (počet odoslaní: {count})", "messageFilter_repeatedCharacters": "Opakované znaky", "messageFilter_repeatedCharactersSubtitle": "Dlhé rady jedného znaku, napríklad „aaaaaaaaaaaaaaaaaaaa“", "messageFilter_learning": "Učiť sa z klepnutí na Spam", diff --git a/lib/l10n/app_sl.arb b/lib/l10n/app_sl.arb index 7e261529..3e4d09e1 100644 --- a/lib/l10n/app_sl.arb +++ b/lib/l10n/app_sl.arb @@ -3645,6 +3645,8 @@ "@messageFilter_duplicatesSubtitle": { "description": "Message filter: The same message sent again, or by several senders" }, + "messageFilter_repeatSends": "Pošiljanje, šteto kot ponovitev", + "messageFilter_repeatSendsSubtitle": "Skrij sporočilo, ko ga isti pošiljatelj v 10 minutah pošlje ponovno (število pošiljanj: {count})", "messageFilter_repeatedCharacters": "Ponavljajoči se znaki", "@messageFilter_repeatedCharacters": { "description": "Message filter: Repeated characters" diff --git a/lib/l10n/app_sv.arb b/lib/l10n/app_sv.arb index 7c8eb94d..c0aa523e 100644 --- a/lib/l10n/app_sv.arb +++ b/lib/l10n/app_sv.arb @@ -3558,6 +3558,8 @@ "messageFilter_automaticSection": "Automatiskt", "messageFilter_duplicates": "Upprepade meddelanden", "messageFilter_duplicatesSubtitle": "Samma meddelande skickas igen, eller av flera avsändare", + "messageFilter_repeatSends": "Utskick som räknas som upprepning", + "messageFilter_repeatSendsSubtitle": "Dölj ett meddelande när samma avsändare skickar det {count} gånger inom 10 minuter", "messageFilter_repeatedCharacters": "Upprepade tecken", "messageFilter_repeatedCharactersSubtitle": "Långa följder av samma tecken, som ”aaaaaaaaaaaaaaaaaaaa”", "messageFilter_learning": "Lär av tryck på Skräppost", diff --git a/lib/l10n/app_uk.arb b/lib/l10n/app_uk.arb index 0f62f71b..dbc16927 100644 --- a/lib/l10n/app_uk.arb +++ b/lib/l10n/app_uk.arb @@ -3543,6 +3543,8 @@ "messageFilter_automaticSection": "Автоматично", "messageFilter_duplicates": "Повідомлення, що повторюються", "messageFilter_duplicatesSubtitle": "Те саме повідомлення, надіслане знову або кількома відправниками", + "messageFilter_repeatSends": "Яка відправка вважається повтором", + "messageFilter_repeatSendsSubtitle": "Приховувати повідомлення, якщо той самий відправник надсилає його повторно протягом 10 хвилин (кількість відправлень: {count})", "messageFilter_repeatedCharacters": "Повторювані символи", "messageFilter_repeatedCharactersSubtitle": "Довгі послідовності одного символа, наприклад «aaaaaaaaaaaaaaaaaaaa»", "messageFilter_learning": "Навчання на натисканнях «Спам»", diff --git a/lib/l10n/app_zh.arb b/lib/l10n/app_zh.arb index 3b4aa865..407ccdc9 100644 --- a/lib/l10n/app_zh.arb +++ b/lib/l10n/app_zh.arb @@ -3568,6 +3568,8 @@ "messageFilter_automaticSection": "自动", "messageFilter_duplicates": "重复消息", "messageFilter_duplicatesSubtitle": "重复发送的相同消息,或多个发送者发送的相同消息", + "messageFilter_repeatSends": "视为重复的发送次数", + "messageFilter_repeatSendsSubtitle": "同一发送者在 10 分钟内发送同一消息 {count} 次时隐藏该消息", "messageFilter_repeatedCharacters": "重复字符", "messageFilter_repeatedCharactersSubtitle": "同一字符的长串重复,例如“aaaaaaaaaaaaaaaaaaaa”", "messageFilter_learning": "从“垃圾消息”点击中学习", diff --git a/lib/models/message_filter.dart b/lib/models/message_filter.dart index 850e06b6..b95024a0 100644 --- a/lib/models/message_filter.dart +++ b/lib/models/message_filter.dart @@ -143,6 +143,10 @@ class MessageFilterSettings { final bool enabled; final FilterDisplayMode displayMode; final bool duplicates; + + /// Which send in a row of the same message by the same sender is flagged + /// as a repeat (2 = the first re-send). + final int repeatSends; final bool repeatedCharacters; final bool learning; final Set excludedChannelIds; @@ -151,6 +155,7 @@ class MessageFilterSettings { this.enabled = true, this.displayMode = FilterDisplayMode.placeholder, this.duplicates = true, + this.repeatSends = defaultRepeatSends, this.repeatedCharacters = true, this.learning = true, this.excludedChannelIds = const {}, @@ -158,10 +163,15 @@ class MessageFilterSettings { static const MessageFilterSettings defaults = MessageFilterSettings(); + static const int defaultRepeatSends = 2; + static const int minRepeatSends = 2; + static const int maxRepeatSends = 5; + MessageFilterSettings copyWith({ bool? enabled, FilterDisplayMode? displayMode, bool? duplicates, + int? repeatSends, bool? repeatedCharacters, bool? learning, Set? excludedChannelIds, @@ -170,6 +180,7 @@ class MessageFilterSettings { enabled: enabled ?? this.enabled, displayMode: displayMode ?? this.displayMode, duplicates: duplicates ?? this.duplicates, + repeatSends: repeatSends ?? this.repeatSends, repeatedCharacters: repeatedCharacters ?? this.repeatedCharacters, learning: learning ?? this.learning, excludedChannelIds: excludedChannelIds ?? this.excludedChannelIds, @@ -180,6 +191,7 @@ class MessageFilterSettings { 'enabled': enabled, 'displayMode': displayMode.name, 'duplicates': duplicates, + 'repeatSends': repeatSends, 'repeatedCharacters': repeatedCharacters, 'learning': learning, 'excludedChannelIds': excludedChannelIds.toList()..sort(), @@ -195,6 +207,11 @@ class MessageFilterSettings { FilterDisplayMode.placeholder, ), duplicates: json['duplicates'] as bool? ?? true, + repeatSends: + ((json['repeatSends'] as num?)?.toInt() ?? defaultRepeatSends).clamp( + minRepeatSends, + maxRepeatSends, + ), repeatedCharacters: json['repeatedCharacters'] as bool? ?? true, learning: json['learning'] as bool? ?? true, excludedChannelIds: excluded is List diff --git a/lib/screens/message_filter_settings_screen.dart b/lib/screens/message_filter_settings_screen.dart index c98e4064..f6f02db4 100644 --- a/lib/screens/message_filter_settings_screen.dart +++ b/lib/screens/message_filter_settings_screen.dart @@ -366,6 +366,36 @@ class _AutomaticOptions extends StatelessWidget { service.settings.copyWith(duplicates: value), ), ), + ListTile( + key: const ValueKey('messageFilter_repeatSends'), + contentPadding: padding, + enabled: settings.duplicates, + leading: const Icon(Icons.repeat, size: 24), + title: Text(l10n.messageFilter_repeatSends), + subtitle: Text( + l10n.messageFilter_repeatSendsSubtitle(settings.repeatSends), + ), + trailing: DropdownButton( + key: const ValueKey('messageFilter_repeatSendsDropdown'), + value: settings.repeatSends, + onChanged: settings.duplicates + ? (value) { + if (value == null) return; + service.updateSettings( + service.settings.copyWith(repeatSends: value), + ); + } + : null, + items: [ + for ( + var n = MessageFilterSettings.minRepeatSends; + n <= MessageFilterSettings.maxRepeatSends; + n++ + ) + DropdownMenuItem(value: n, child: Text('$n')), + ], + ), + ), const Divider(height: 1, indent: 16), SwitchListTile( key: const ValueKey('messageFilter_repeatedCharactersSwitch'), diff --git a/lib/services/message_filter/duplicate_tracker.dart b/lib/services/message_filter/duplicate_tracker.dart index 7b8a66ce..563f725b 100644 --- a/lib/services/message_filter/duplicate_tracker.dart +++ b/lib/services/message_filter/duplicate_tracker.dart @@ -12,7 +12,17 @@ class _SeenMessage { /// When this device saw it (local clock). Only used to forget entries. final DateTime receivedAt; - const _SeenMessage(this.sender, this.key, this.sentAt, this.receivedAt); + + /// How many sends of this text by this sender, each within the + /// same-sender window of the previous one, end with this one (1 = first). + final int sends; + const _SeenMessage( + this.sender, + this.key, + this.sentAt, + this.receivedAt, { + this.sends = 1, + }); } /// In-memory, per-channel tracker of recently seen channel texts used to catch @@ -28,6 +38,16 @@ class _SeenMessage { /// so a sender whose clock is far off cannot push everyone else's entries /// out early or keep its own around forever. /// +/// A copy with the same sender, text and send second as an entry already +/// recorded is the same message seen again (another companion syncing it, +/// a mesh repeat that slipped past storage dedup), never a repeat, and is +/// not recorded twice. +/// +/// The same-sender rule flags the [sameSenderSends]th send of a text in a +/// row, each send within [sameSenderWindow] of the previous one (2 = the +/// first re-send). Higher values tolerate people re-sending when they see +/// no repeat or reply. +/// /// The same-sender rule only applies to texts of at least /// [sameSenderMinWords] words and [sameSenderMinLength] characters: people /// naturally repeat short replies ("ok", "yes", "test" when checking reach), @@ -42,6 +62,7 @@ class DuplicateTracker { this.sameSenderWindow = const Duration(minutes: 10), this.sameSenderMinLength = 10, this.sameSenderMinWords = 3, + this.sameSenderSends = 2, this.crossSenderWindow = const Duration(minutes: 30), this.crossSenderMinSenders = 3, this.crossSenderMinLength = 10, @@ -54,6 +75,10 @@ class DuplicateTracker { /// Minimum length / word count for the same-sender rule (see class docs). final int sameSenderMinLength; final int sameSenderMinWords; + + /// Which send in a row of the same text is flagged; can be overridden per + /// call so a settings change applies immediately. + final int sameSenderSends; final Duration crossSenderWindow; final int crossSenderMinSenders; final int crossSenderMinLength; @@ -95,7 +120,11 @@ class DuplicateTracker { required String text, required DateTime at, DateTime? receivedAt, + int? sameSenderSends, }) { + final flagAt = (sameSenderSends ?? this.sameSenderSends) < 2 + ? 2 + : (sameSenderSends ?? this.sameSenderSends); final arrived = receivedAt ?? at; final key = MessageFilterText.normalizeForDuplicates(text); if (key.isEmpty) return null; @@ -103,21 +132,38 @@ class DuplicateTracker { final entries = _seen.putIfAbsent(channelId, ListQueue<_SeenMessage>.new); _prune(entries, arrived); + final atSecond = _second(at); + for (final entry in entries) { + if (entry.key == key && + entry.sender == senderKey && + _second(entry.sentAt) == atSecond) { + // The same message seen again, not a new send. + return null; + } + } + + // The longest run of sends this one continues: earlier sends of this + // text by this sender within the window, each already carrying its run. + var sends = 1; + for (final entry in entries) { + if (entry.key != key || entry.sender != senderKey) continue; + if (entry.sentAt.difference(at).abs() <= sameSenderWindow && + entry.sends + 1 > sends) { + sends = entry.sends + 1; + } + } + FilterReason? result; if (!isAllowed(channelId, text)) { final senders = {senderKey}; - var sameSender = false; for (final entry in entries) { - if (entry.key != key) continue; + if (entry.key != key || entry.sender == senderKey) continue; // Absolute gap between send times: delivery order does not matter. - final gap = entry.sentAt.difference(at).abs(); - if (entry.sender == senderKey) { - if (gap <= sameSenderWindow) sameSender = true; - } else if (gap <= crossSenderWindow) { + if (entry.sentAt.difference(at).abs() <= crossSenderWindow) { senders.add(entry.sender); } } - if (sameSender && + if (sends >= flagAt && key.length >= sameSenderMinLength && _wordCount(key) >= sameSenderMinWords) { result = FilterReason.duplicate; @@ -128,11 +174,13 @@ class DuplicateTracker { } } - entries.addLast(_SeenMessage(senderKey, key, at, arrived)); + entries.addLast(_SeenMessage(senderKey, key, at, arrived, sends: sends)); if (entries.length > maxEntriesPerChannel) entries.removeFirst(); return result; } + static int _second(DateTime time) => time.millisecondsSinceEpoch ~/ 1000; + /// [key] is already whitespace-collapsed by `normalizeForDuplicates`. static int _wordCount(String key) => key.isEmpty ? 0 : key.split(' ').length; diff --git a/lib/services/message_filter/message_filter_service.dart b/lib/services/message_filter/message_filter_service.dart index 5f679c7d..355cccaa 100644 --- a/lib/services/message_filter/message_filter_service.dart +++ b/lib/services/message_filter/message_filter_service.dart @@ -139,6 +139,10 @@ class MessageFilterService extends ChangeNotifier { /// [sentAt] is the message's own timestamp. Duplicate windows are measured /// between send times, so history synced in a burst after reconnecting is /// not mistaken for a flood; without it the local clock is used. + /// + /// Messages addressed to someone ([isReply], or an `@[name]` mention in + /// [text]) are exempt from duplicate detection and not recorded for it: + /// asking several people the same thing is conversation, not a repeat. FilterVerdict? evaluate({ required String channelId, required String sender, @@ -146,6 +150,7 @@ class MessageFilterService extends ChangeNotifier { DateTime? sentAt, bool isOutgoing = false, bool isReaction = false, + bool isReply = false, }) { if (!isChannelFiltered(channelId)) return null; if (isOutgoing || isReaction) return null; @@ -153,13 +158,17 @@ class MessageFilterService extends ChangeNotifier { if (MessageFilterText.isStructuredPayload(text)) return null; // Always record (even when a rule matches) so floods keep being caught. - final duplicateReason = _tracker.check( - channelId: channelId, - sender: sender, - text: text, - at: sentAt ?? _clock(), - receivedAt: _clock(), - ); + final mentionsSomeone = isReply || MessageFilterText.hasMention(text); + final duplicateReason = mentionsSomeone + ? null + : _tracker.check( + channelId: channelId, + sender: sender, + text: text, + at: sentAt ?? _clock(), + receivedAt: _clock(), + sameSenderSends: _settings.repeatSends, + ); final byRule = _matchRules(sender, text); if (byRule != null) return byRule; diff --git a/lib/services/message_filter/message_filter_text.dart b/lib/services/message_filter/message_filter_text.dart index 557eb903..26d9d93d 100644 --- a/lib/services/message_filter/message_filter_text.dart +++ b/lib/services/message_filter/message_filter_text.dart @@ -141,6 +141,9 @@ class MessageFilterText { return _fold(text).replaceAll(_whitespace, ' ').trim(); } + /// True when [text] contains an `@[name]` mention. + static bool hasMention(String text) => _mention.hasMatch(text); + /// Looser form used to detect repeated messages: also drops `@[name]` /// mentions, punctuation and emoji so trivial variations still match. static String normalizeForDuplicates(String text) { diff --git a/lib/widgets/holiday_animations.dart b/lib/widgets/holiday_animations.dart index 5a8c2254..c03a1bf7 100644 --- a/lib/widgets/holiday_animations.dart +++ b/lib/widgets/holiday_animations.dart @@ -16,12 +16,32 @@ Duration holidayAnimationDuration(HolidayAnimation animation) => HolidayAnimation.newYear => const Duration(milliseconds: 5600), }; +/// Quiet time after a holiday animation ends before another may start. +const Duration holidayAnimationMinInterval = Duration(seconds: 5); + +/// Clock for the rate limit; tests replace it. +@visibleForTesting +DateTime Function() holidayAnimationClock = DateTime.now; + +OverlayEntry? _activeHolidayEntry; +DateTime? _holidayQuietUntil; + +/// Forgets the playing animation and the quiet period (tests only). +@visibleForTesting +void resetHolidayAnimationGate() { + _activeHolidayEntry = null; + _holidayQuietUntil = null; +} + /// Plays [animation] over the whole screen, starting from [origin] (global /// coordinates of the message it came from). Touches pass through, and the /// overlay removes itself when done. /// -/// Skipped when the user turned holiday animations off or the platform asks -/// for reduced motion. +/// Skipped when the user turned holiday animations off, the platform asks +/// for reduced motion, another holiday animation is still playing, or the +/// last one ended less than [holidayAnimationMinInterval] ago (so a burst of +/// greetings plays once instead of piling up). Skipped animations are +/// dropped, not queued. void playHolidayAnimation( BuildContext context, HolidayAnimation animation, { @@ -30,6 +50,11 @@ void playHolidayAnimation( final settings = context.read().settings; if (!settings.holidayAnimationsEnabled) return; if (MediaQuery.maybeDisableAnimationsOf(context) ?? false) return; + // Unmounted when it finished or its overlay went away. + if (_activeHolidayEntry?.mounted ?? false) return; + final now = holidayAnimationClock(); + final quietUntil = _holidayQuietUntil; + if (quietUntil != null && now.isBefore(quietUntil)) return; final overlay = Overlay.maybeOf(context, rootOverlay: true); if (overlay == null) return; late final OverlayEntry entry; @@ -37,9 +62,23 @@ void playHolidayAnimation( builder: (_) => HolidayAnimationView( animation: animation, origin: origin, - onDone: () => entry.remove(), + onDone: () { + if (identical(_activeHolidayEntry, entry)) { + _activeHolidayEntry = null; + _holidayQuietUntil = holidayAnimationClock().add( + holidayAnimationMinInterval, + ); + } + entry.remove(); + }, ), ); + _activeHolidayEntry = entry; + // Until it reports its end: the end it should reach, plus the quiet time, + // in case the overlay goes away without finishing it. + _holidayQuietUntil = now + .add(holidayAnimationDuration(animation)) + .add(holidayAnimationMinInterval); overlay.insert(entry); } diff --git a/test/helpers/holiday_triggers_test.dart b/test/helpers/holiday_triggers_test.dart index bae8752d..3a43b016 100644 --- a/test/helpers/holiday_triggers_test.dart +++ b/test/helpers/holiday_triggers_test.dart @@ -69,8 +69,12 @@ void main() { group('HolidayTriggerWatcher', () { late AppSettingsService settings; + late DateTime now; setUp(() async { + now = DateTime(2026, 12, 25, 12); + holidayAnimationClock = () => now; + resetHolidayAnimationGate(); SharedPreferences.setMockInitialValues({}); await PrefsManager.initialize(); settings = AppSettingsService(); @@ -147,6 +151,7 @@ void main() { ) async { final ctx = await host(tester); for (final animation in HolidayAnimation.values) { + now = now.add(holidayAnimationMinInterval); playHolidayAnimation(ctx, animation, origin: const Offset(80, 500)); await tester.pump(); expect(find.byType(HolidayAnimationView), findsOneWidget); @@ -157,6 +162,42 @@ void main() { } }); + testWidgets('one at a time, then 5 quiet seconds after it ends', ( + tester, + ) async { + final ctx = await host(tester); + void play(HolidayAnimation a) => + playHolidayAnimation(ctx, a, origin: Offset.zero); + + play(HolidayAnimation.christmas); + await tester.pump(); + expect(find.byType(HolidayAnimationView), findsOneWidget); + + // Still playing: a second greeting is dropped, not stacked or queued. + now = now.add(const Duration(seconds: 30)); + play(HolidayAnimation.newYear); + await tester.pump(); + expect(find.byType(HolidayAnimationView), findsOneWidget); + await tester.pumpAndSettle(); // christmas ends at `now` + expect(find.byType(HolidayAnimationView), findsNothing); + // Nothing was queued behind it. + await tester.pump(const Duration(seconds: 10)); + expect(find.byType(HolidayAnimationView), findsNothing); + + // Under 5 seconds after it ended: dropped. + now = now.add(const Duration(seconds: 4)); + play(HolidayAnimation.newYear); + await tester.pump(); + expect(find.byType(HolidayAnimationView), findsNothing); + + // 5 seconds after it ended: plays. + now = now.add(const Duration(seconds: 1)); + play(HolidayAnimation.newYear); + await tester.pump(); + expect(find.byType(HolidayAnimationView), findsOneWidget); + await tester.pumpAndSettle(); + }); + testWidgets('respects the setting and reduced motion', (tester) async { await settings.setHolidayAnimationsEnabled(false); var ctx = await host(tester); diff --git a/test/services/message_filter/duplicate_tracker_test.dart b/test/services/message_filter/duplicate_tracker_test.dart index 2a2e28c3..f6be0ef8 100644 --- a/test/services/message_filter/duplicate_tracker_test.dart +++ b/test/services/message_filter/duplicate_tracker_test.dart @@ -27,6 +27,56 @@ void main() { ); }); + test('sameSenderSends sets which send in a row is flagged', () { + final tracker = DuplicateTracker(); + const text = 'Anyone on the hill repeater?'; + FilterReason? send(int minutes) => tracker.check( + channelId: 'c', + sender: 'Bob', + text: text, + at: t0.add(Duration(minutes: minutes)), + sameSenderSends: 3, + ); + expect(send(0), isNull); + // Re-sent because nobody answered. + expect(send(4), isNull); + expect(send(9), FilterReason.duplicate); + // A slow flood keeps the run going: each send is within the window of + // the previous one. + expect(send(17), FilterReason.duplicate); + expect(send(25), FilterReason.duplicate); + }); + + test('the same message seen again is never a repeat', () { + final tracker = DuplicateTracker(); + const text = 'Gday from Brunkerville, how is everyone'; + // Another companion syncing messages the first one already delivered: + // same sender, text and send second, arriving later. + for (var i = 0; i < 5; i++) { + expect( + tracker.check( + channelId: 'c', + sender: 'VK2WSL TRACKER', + text: text, + at: t0, + receivedAt: t0.add(Duration(minutes: i)), + ), + isNull, + ); + } + // Copies are not counted: a real re-send is only the second send. + expect( + tracker.check( + channelId: 'c', + sender: 'VK2WSL TRACKER', + text: text, + at: t0.add(const Duration(minutes: 2)), + sameSenderSends: 3, + ), + isNull, + ); + }); + test('short replies repeated by the same sender are not duplicates', () { final tracker = DuplicateTracker(); for (final text in ['ok', 'test', 'yes sir', 'ok']) { diff --git a/test/services/message_filter/message_filter_service_test.dart b/test/services/message_filter/message_filter_service_test.dart index 865adff3..a6166dbd 100644 --- a/test/services/message_filter/message_filter_service_test.dart +++ b/test/services/message_filter/message_filter_service_test.dart @@ -204,8 +204,10 @@ void main() { test('duplicates setting off still records but does not filter', () async { await service.updateSettings(service.settings.copyWith(duplicates: false)); - expect(eval('a', 'meet at the park'), isNull); - expect(eval('a', 'meet at the park'), isNull); + for (var i = 0; i < 3; i++) { + expect(eval('a', 'meet at the park'), isNull); + now = now.add(const Duration(minutes: 1)); + } await service.updateSettings(service.settings.copyWith(duplicates: true)); expect(eval('a', 'meet at the park')?.reason, FilterReason.duplicate); }); @@ -216,13 +218,55 @@ void main() { eval('a', 'buy cheap radios here now')?.reason, FilterReason.textRule, ); + now = now.add(const Duration(minutes: 1)); + expect( + eval('a', 'buy cheap radios here now')?.reason, + FilterReason.textRule, + ); await service.removeRule('x'); + now = now.add(const Duration(minutes: 1)); expect( eval('a', 'buy cheap radios here now')?.reason, FilterReason.duplicate, ); }); + test('repeatSends setting picks which send is flagged', () async { + await service.updateSettings(service.settings.copyWith(repeatSends: 3)); + expect(eval('a', 'meet at the park'), isNull); + now = now.add(const Duration(minutes: 1)); + expect(eval('a', 'meet at the park'), isNull); + now = now.add(const Duration(minutes: 1)); + expect(eval('a', 'meet at the park')?.reason, FilterReason.duplicate); + }); + + test('repeatSends is saved and clamped', () { + const settings = MessageFilterSettings(repeatSends: 4); + expect(MessageFilterSettings.fromJson(settings.toJson()).repeatSends, 4); + expect(MessageFilterSettings.fromJson({}).repeatSends, 2); + expect(MessageFilterSettings.fromJson({'repeatSends': 99}).repeatSends, 5); + expect(MessageFilterSettings.fromJson({'repeatSends': 0}).repeatSends, 2); + }); + + test('messages that mention someone are exempt from duplicates', () { + for (var i = 0; i < 4; i++) { + // Asking several people the same thing. + expect(eval('a', '@[Person$i] are you home yet'), isNull); + expect( + service.evaluate( + channelId: _channel, + sender: 'b', + text: 'did you get my message', + isReply: true, + ), + isNull, + ); + now = now.add(const Duration(minutes: 1)); + } + // Mentions were not recorded, so the plain text starts fresh. + expect(eval('a', 'are you home yet'), isNull); + }); + test('not spam exempts duplicates in that channel', () async { eval('a', 'meet at the park'); await service.markNotSpam(