كيفية تغيير مستويات الإشعارات لجميع المستخدمين في موضوع

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.

إعجاب واحد (1)

Admin menu
Settings
User Preferences


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

إعجاب واحد (1)

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.

إعجاب واحد (1)

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.

إعجابَين (2)

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
3 إعجابات

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

إعجابَين (2)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.