Skip to content

Display a reason for each notification #96

@rossjrw

Description

@rossjrw

#85 added a set of flags that indicate which context/contexts is/are responsible for a notification being raised:

-- Flags indicating the reasons that a post emits a notification
CASE WHEN (
thread_sub.sub = 1
) THEN 1 ELSE 0 END AS flag_user_subscribed_to_thread,
CASE WHEN (
post_sub.sub = 1
) THEN 1 ELSE 0 END AS flag_user_subscribed_to_post,
CASE WHEN (
context_thread.first_post_author_user_id = %(user_id)s
) THEN 1 ELSE 0 END AS flag_user_started_thread,
CASE WHEN (
context_parent_post.author_user_id = %(user_id)s
) THEN 1 ELSE 0 END AS flag_user_posted_parent

These should be used in the digest to justify each notifcation's existence, which prompts the user to deduplicate contexts and also lets them know exactly how to e.g. unsubscribe from a given notification specifically. Will be increasingly important as new contexts are added (#77, #86, etc).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions