Read and set the notification-level of categories for a specific user (or all users)

api

(Henning) #1

I have a internal category where we want to ensure that alle users has set notification-level to Tracking or Watching.

And if not, we want to force the notification-level to Tracking (either by having a way to force it, or by pushing the setting via API.

Any hint on how that can be done?

/Henning


(Mittineague) #2

That would bother me.
If I want to Watch or Track something I will. If I don’t want to, having it forced upon me is IMHO akin to being SPAMmed.

Having it as a default wouldn’t bother me so much, but if I “opt out” please don’t change it on me.


(Henning) #3

I see your point, but we have a lot of people that think it’s to difficult to set that flag manually, and are talking of setting it up as a regular mailing-list.

On the other hand some people wan’t to use a forum instead of a mailing-list. I want to tie both groups together.

Another case I have in another case is a announce-list that MUST be sent via mail, according to the statutes of the assosiation. If I send via a normal mailingist og from discourse doesn’t make any difference i my optics.

Anyway. Is there a way to set that flag via api, or do I have to impersonate the users and set it manually? Wouæd be a pain in the a** :wink:


(Jeff Atwood) #4

You can do it with a SQL statement. I believe there are examples here on this site, somewhere. Overriding user settings globally is slated for 1.4.


(Henning) #5

I’ve implemented a setup where I pull all groups from discourse wint
https://example/admin/groups.json
and then pull the members with
https://example.com/groups/$groupname/members.json
saving the membership in my database in the backend.

Right now I’m not able to add and delete members from my backend, but that’s fairly simple, just emulation the request done directly in the admin-section på discourse.