Only showing most recent notification from a watched topic?

Not that small, I would say :wink: but no, the notification was there, it was published whenever you posted your reply and I saw it via the discourse Android app. Unfortunately, the app doesn’t take you to the post when you tap the android notification so I navigated to meta, tapped my avatar and tapped the notification about your reply. That’s how I got here. But now it’s no longer there:

Wait, there is a pattern here. The above screenshot was taken when I composed my previous reply. Here is what it looks like now:

Notice how I now have the notification for your last reply but the one from merefield is also gone now?

2 Likes

Something fishy is definitely going on here… the notification from merefield seems to be missing from the database as well :thinking:

[5] pry(main)> User.find_by_username("tophee").notifications.order(created_at: :desc).limit(10).pluck(:data).map { |d| JSON.parse(d) }.map {|j| j["display_username"] }
=> ["david", "david", "david", "david", "codinghorror", "zogstrip", "gpetrov", "SidV", "jomaxro", "sam"]

Now that you have a fresh notification, has anything changed @tophee?

2 Likes

This is what it looks like now:

So nothing new went missing (possibly because of the new topic).

1 Like

Oh, this is expected behaviour, I just never noticed it before. If you’re watching a topic, we don’t want you to end up with millions of notifications about a single topic, so we only keep the ‘most recent’ notification.

So after you received the android notification, merefield replied and caused the other notification to be deleted. We don’t delete the notification from Android, only from the web UI.

https://github.com/discourse/discourse/blob/82e45f5485be0deaa606b3536426666f2bf88412/app/services/post_alerter.rb#L339-L342

6 Likes

This topic was automatically closed after 18 minutes. New replies are no longer allowed.