Notifications from muted categories when mailing list mode is enabled

We’re running an instance where all categories are muted and all users in mailing list mode by default.
It happens quite often that users get mails from individual threads in their muted categories. It’s really hard to find any pattern in that behaviour.

It seems to look like that bug Still getting notifications from muted user in mailing list mode - #5 by lkramer but for muted categories.

Is there any (quick) fix for that? We’ve got >1k users and several hundred categories → even a small error rate is quite annoying.

cc @trobiyo

I’m afraid we’re going to need more information. Is this issue really random? Is there no correlation/similitudes at all between those notifications?

2 Likes

Maybe they have participated i those topics, which trumps the muting? That’s my guess.

If you can’t replicate the problem then it’s not really a bug, or at least not a bug report.

But I thought that Mailing list mode was meant to really email everyone all the time and I’m almost suprised that muting categories or users works. I’d recommend that you instead not use mailing list mode and instead have people who really love email watch the categories they want rather than mute those that they don’t want. But it sounds like it woud be a huge undertaking, so I think it’s too late for this recommendation to be useful. :person_shrugging:

2 Likes

Since I cannot search for the subject in the Sent Email admin panel it’s hard to trace this unfortunately.

The auto-track is set to never by default and none of the affected users have changed that.

Well… ¯\_(ツ)_/¯
The only real reason to use mailing list mode is that in this case one gets own messages by mail – this is a very very very frequent request.

Another advantage of muting: it does not clutter the category overview page when there are hundreds of categories (and yes we tried to encourage reducing the number when moving from the previous forum/mailing list)

3 Likes

Right. Do you have the data explorer plugin installed? If you know SQL that might be one way to quickly dig into these sent emails.

2 Likes

Right, so I played a bit with the data explorer, but let me first explain how we set up the users/notifications:

  1. First, we mirrored the old mailing list for some time period to accumulate some content in discourse.
    [NB: we did this is a separate dev instance and then copied the posts to the prod instance]
  2. Then we “subscribed” the users based on the old mailing lists → hence they might be subscribed (watching) to some categories automatically based on their previous mail list subscriptions.

So I took a user that never visited the website: e.g. never seen, no posts read etc.
Then I use the plugin “List of topics a user is watching/tracking/muted”.
And I see that at notification level 3 only topics in the categories he was auto-subscribed to - good.
When I check level 1 I see many topics - which is probably also ok since only categories are muted, not topics, i.e. they should be regular = 1. But for some reason the topic_last_visited_at is always present and corresponds to the topic creation date.

Then, there are users which were created as staged users in the prod instance via email in and then activated - but never visited the website. For such users I do not see any topics in notification level 1!

So it seems there might be some mess created for initially staged users.

Question: is there any way to reset the topic notification levels for users?

2 Likes

Maybe before that: is there any way to view the topic notification levels of a user?
I have not found it in the admin web panel. Is that only accessible at the DB level?

You should be able to query notification levels using the data-explorer. I think there may be a useful query you could amend in List of emails of users watching a specific category

1 Like

Unfortunately the data explorer does not allow seeing the topic notification levels per user.
I verified that the users getting these spurious emails are not subscribed to the categories.

Something like this should do it, unless I’ve misunderstood what you’re after?


-- [params]
-- int :topic_id

SELECT tu.user_id,
       tu.notification_level
FROM topic_users tu
WHERE tu.topic_id = :topic_id
ORDER BY tu.notification_level DESC
2 Likes

Thanks for this @JammyDodger !

So I checked a topic ID that I never visited and could not find myself in the list. But when I visit that topic and rerun the query I appear in the list with notification level = 1. Is this expected? (note that auto-tracking is off!)

Then, for the topics that were causing spurious mails to many many users I found a huuuge list of users with notif. level = 1. Some of these are staged used which actually never logged in on the web and also did not participate in the thread.

Finally, I found that the topics with mass-subscriptions were mostly from before the time the site went online and users could log in. Also the number of subscribers is pretty stable and seems to correspond to the number of users the site had at that time.

I should note that at some point I enabled the setting allow changing staged user tracking but then I disabled that. I also enabled/disabled the mute all categories by default at some point.
Maybe this all somehow caused this confusion?

In the end I should probably just suggest the users to unsubscribed from the unwanted topics.

2 Likes

Notification level 1 is ‘Normal’, so that would be expected. And you only get a record in the topic_users table if you’ve visited the topic, so that is expected too. :+1:

It sounds like you may have flipped on some topic notification levels when you tweaked some settings. Could you have a look specifically for anyone who is Watching a topic in a muted category, and see if they’re the people affected in your original issue?

Actually, if they’re marked as Normal in the topic I think that would override the category mute too. You may have landed on the answer. :slightly_smiling_face: I think your previous settings change could have mass-set everyone’s topic notification level, and changing it again only affected new topics going forward.

1 Like

Topic specific notification level always wins when it conflicts with a category or tag default notification level.

2 Likes