Filter question replies from notifications

This commit is contained in:
Thomas Sileo 2019-07-07 16:11:07 +02:00
parent ba9f945b7b
commit 7048de7ba5

7
app.py
View file

@ -2856,8 +2856,11 @@ def task_process_new_activity():
elif activity.has_type(ap.ActivityType.CREATE): elif activity.has_type(ap.ActivityType.CREATE):
note = activity.get_object() note = activity.get_object()
in_reply_to = note.get_in_reply_to() 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 # 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
if not in_reply_to or in_reply_to.startswith(ID): # answer
if (not in_reply_to or in_reply_to.startswith(ID)) and not note.has_type(
ap.ActivityType.QUESTION
):
tag_stream = True tag_stream = True
# FIXME(tsileo): check for direct addressing in the to, cc, bcc... fields # FIXME(tsileo): check for direct addressing in the to, cc, bcc... fields