FEATURE: Special call-out for new / returning posters. (PR #7115)


You’ve signed the CLA, udan11. Thank you! This pull request is ready for review.

This pull request has been mentioned on Discourse Meta. There might be relevant details there:


Edge case:

  • user creates post … gets notice
  • admin deletes post
  • user creates another post… gets notice
  • admin undeletes old post, now 2 posts have a notice

Simplest workaround is to blow up the notice on undelete, trickier one is just to remove other dupe notices on undelete.

   unless last_post_time

Why check for posts older than 1 day? Also, the order doesn’t seem right :wink:

last_post_time = Post.where(user_id: @user.id)
  .order(created_at: :desc)

The order in the query for last_post_time should be descending.