From 160ab41a5a37b194b9312d5d50a5f71b69fb3d6d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 5 Jul 2022 19:49:53 +0100 Subject: [PATCH] Include summary in dogwhistle detection --- webapp_post.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webapp_post.py b/webapp_post.py index e1b118bbb..cc34a0fb3 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -1562,7 +1562,8 @@ def _add_dogwhistle_warnings(summary: str, content: str, """ if not dogwhistles: return summary - detected = detect_dogwhistles(content, dogwhistles) + content_str = str(summary) + ' ' + content + detected = detect_dogwhistles(content_str, dogwhistles) if not detected: return summary