minor tweak to heuristic for Feb 2024 Japanese mention spam flood

pull/889/head
Ryan Barrett 2024-02-18 13:49:37 -08:00
rodzic 7d9467fa19
commit e55ef252ab
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6BE31FDF4776E9D4
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -894,7 +894,7 @@ def inbox(protocol=None, id=None):
if type == 'Create':
obj = activity.get('object', {})
mentions = [t for t in util.get_list(obj, 'tag') if t.get('type') == 'Mention']
if (len(mentions) == 5
if (len(mentions) in (4, 5)
and len(util.get_list(obj, 'attachment')) == 1
and not obj.get('inReplyTo')
and len(obj.get('attributedTo', '').split('/')[-1]) == 10):