What would be a good way (Mongo statement, I suppose) to add every user to a group?
That script is no longer compatible with latest the set names changed.
@julian I can't seem to find the setting. Where do I change the global default? Is this feature on 1.12 or master?
Here it is, I knew I wasn't crazy
@julian Okay, thanks. I misinterpreted the the settings. I thought this was a per category global setting. This is a global all categories setting.
What I need is to set the default for about 5 or our categories to "Ignored" and "Watch" for the rest.
uid:<uid>:ignored:cids got removed there is a single set
@baris So the
_key is as you described, the
value is the user id, and the
score is the watch state?
So I can't just write these records, I need to check for existing, handle that and continue.
Sorry, I'm trying to follow but I'm just not understanding how the database model works. I try digging into the code and go to db.sortedSetsAdd to see what that actually does but there's no docs so I read some more code and it adds a records but I'm not understanding what it means and why. I'm stuck now but I'll figure it out eventually. Thanks.
@baris So the _key is as you described, the value is the user id, and the score is the watch state?
That's correct, and the records do not exist until a user explicitly changes the setting on the category page. Until they change it the default from the ACP is used.
There are 3 possible values. https://github.com/NodeBB/NodeBB/blob/master/src/categories/watch.js#L9