Moderator Inbox Notifications

Oh, a Contrarian now are we? :wink:
So much for the User Watch taking precedence over Group Track hypothesis,
I’ve just discovered it’s group_users.notification_level, hypothesis is incorrect.

I found another Watching issue and I’ve been digging around.

I’m guessing it has to do with the ordering of what gets returned - somewhere. eg. in


    if (topicId) {
      return Discourse.Utilities.postUrl(attrs.slug, topicId, attrs.post_number);

    if (attrs.notification_type === INVITED_TYPE) {
      return Discourse.getURL('/users/' + data.display_username);

    if (data.group_id) {
      return Discourse.getURL('/users/' + data.username + '/messages/group/' + data.group_name);

i.e. if there are both a group_id and a topicId, it’s the topicId that gets returned.

Yes I think it’s a bug. Here is the description for Watching:

You will be notified of every new post in every message, and a count of new replies will be shown.

I prefer to set my notification level to Watching and I would expect to see the group_message_summary notification when I do that (e.g. “6 messages in your moderators inbox”).

Here is the code that decides who receives a group summary notification:

It’s the notify_group_summary function that sends group_message_summary notifications. So currently, only group members with a notification level set to Tracking will receive it. I think we could modify the code like this:

if notification_level == TopicUser.notification_levels[:watching]
  create_notification(user, Notification.types[:private_message], post)
  notify_group_summary(user, post)
elsif notification_level == TopicUser.notification_levels[:tracking]
  if notified.include?(user)
    create_notification(user, Notification.types[:private_message], post)
    notify_group_summary(user, post)

Would that be the best way to fix this bug? Let me know if you have other ideas :slight_smile:

1 Like

hmmm … is there anything more to do here.

Is the root problem here that we did not reset tracking state on all old messages (since the new watching setting only applies to new messages) ?

Not from I, it seems to be working as expected again for me, but things have also changed on my end, as I’m now the admin (but I feel like it was working better before that happened)