You’ve signed the CLA, vinothkannans. Thank you! This pull request is ready for review.
Small tip here. You can use
AND (COALESCE(cu.notification_level, :muted) = :muted)
(same for the next line.)
Looks good so far!
Do we need to call
uniq here? In case there are duplicates there’s no point in passing them to the DB.
We already doing the site setting validation to prevent duplicates. So no need to worry here.
@eviltrout I pushed a fix and added the
COALESCE in SQL.
I think we need a better description:
“Require users opt-in to tracking and watching categories for them to appear in latest and /categories page. If you wish to amend the defaults for anonymous users set default_categories_tracking and default_categories_watching”
Something like that so it is a bit clearer what it does.
overall I am happy with this! cc @tgxworld
The categories will appear even if they opt-in for “normal” or “watching first post”. And the same for
default_categories_watching_first_post site setting. So I’m changing it like below. Is it looks good?
Set the default notification level of all the categories to muted. Require users opt-in to categories for them to appear in ‘latest’ and ‘categories’ pages. If you wish to amend the defaults for anonymous users set ‘default_categories_’ settings.