Skip to content

Commit

Permalink
Filter users last notified about current post
Browse files Browse the repository at this point in the history
  • Loading branch information
rossjrw committed Feb 8, 2024
1 parent 70e0158 commit 6f11aad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions notifier/database/queries/delete_non_notifiable_posts.sql
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ WHERE
)

-- Users are not notified about their own posts
AND post.author_user_id <> user_config.user_id
AND user_config.user_id <> post.author_user_id

-- Only users last notified before this post was posted
AND post.posted_timestamp > user_config.notified_timestamp
-- Users whose last notified post was earlier than this one
AND user_config.notified_timestamp <= post.posted_timestamp

-- Filter out users unsubscribed to this post
AND (
Expand Down

0 comments on commit 6f11aad

Please sign in to comment.