From 7048de7ba5afd8f6b5af94c2e916abd590a42986 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sun, 7 Jul 2019 16:11:07 +0200 Subject: [PATCH] Filter question replies from notifications --- app.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 4ce826f..3927f98 100644 --- a/app.py +++ b/app.py @@ -2856,8 +2856,11 @@ def task_process_new_activity(): elif activity.has_type(ap.ActivityType.CREATE): note = activity.get_object() in_reply_to = note.get_in_reply_to() - # Make the note part of the stream if it's not a reply, or if it's a local reply - if not in_reply_to or in_reply_to.startswith(ID): + # Make the note part of the stream if it's not a reply, or if it's a local reply **and** it's not a poll + # answer + if (not in_reply_to or in_reply_to.startswith(ID)) and not note.has_type( + ap.ActivityType.QUESTION + ): tag_stream = True # FIXME(tsileo): check for direct addressing in the to, cc, bcc... fields