How to change the notification levels for all users on a topic?

AI-generated summary

The discussion revolves around changing the notification levels for all users on a topic. j127 wants to set users to “Mute” or “Normal” to reduce activity on a big topic due to a complex moderation situation. Arkshine suggests enabling Slow Mode, but j127 prefers a solution that won’t trigger a public discussion.

Moin proposes unlisting the topic to hide it from the forum, but JammyDodger notes that users who are already Watching the topic will still receive notifications. To change notification levels, JammyDodger suggests using the /t/TOPIC_ID/notifications endpoint or running a Rails console command TopicUser.where(topic_id: TOPIC_ID).update(notification_level: 1). This will update the notification levels for users on the topic, but may not affect category and tag level notifications.

Does anyone know a safe way to set the notification levels for all users on a topic to a single value? I’m guessing that it would be something in the Rails console.

I want to set all the users on a topic to “Mute” or “Normal” instead of “Watching” or “Tracking.”

The goal is to reduce activity on a big topic in a complex moderation situation.

Admin menu
Settings
User Preferences


Wait sorry you mean just 1 topic. Yeah imagine may need rails

What about enabling Slow Mode? Would not it help to reduce the activity? :thinking:

This situation is complex and I don’t want a visual indication that triggers a public discussion about it that might take up hours of moderation time. (I’m already completely overwhelmed.) The ideal outcome is that people just aren’t reminded that the topic exists.

I would unlist the topic. Then it is hidden from the forum so probably most users won’t see it there anymore. But when they have a link to that topic (e.g., because they received a notification), they can still open the topic.

Though, just to note, if they’re Watching it then they’d still get notifications when it’s Unlisted.

I think you can now use the /t/TOPIC_ID/notifications endpoint to set the notification level for a user on a specific topic, if that’s a more appealing choice than the rails console?

Extra details
  • The API user should be an admin(so they should have global scope) to be able to change another user’s notification level.
  • Endpoint URL: siteurl/t/<topic_id>/notifications
  • Request type: POST
  • Parameters:
    • username or external_id of the target user. If empty, the admin’s own notifcation level for the topic will be changed.
    • notification_level: integer value corresponding to the level
      • muted: 0,
      • regular: 1,
      • normal: 1, # alias for regular
      • tracking: 2,
      • watching: 3,

But for the rails console I think it would be this: (remember to take a backup just in case before trying to change things in rails :warning:)

TopicUser.where(topic_id: TOPIC_ID).update(notification_level: 1)

(1 is normal, 0 is mute)

That would change the topic level ones, but there may be category and tag level ones which may still affect who gets a ping for new activity.

And a little data explorer query to check the levels for users on a topic if that’s useful too:

SELECT 
    topic_id,
    user_id,
    notification_level
FROM topic_users
WHERE topic_id = TOPIC_ID

Thanks for the detailed response. I’ll try the API tomorrow.