mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:34:57 +08:00
FEATURE: whispers available for groups (#17170)
Before, whispers were only available for staff members. Config has been changed to allow to configure privileged groups with access to whispers. Post migration was added to move from the old setting into the new one. I considered having a boolean column `whisperer` on user model similar to `admin/moderator` for performance reason. Finally, I decided to keep looking for groups as queries are only done for current user and didn't notice any N+1 queries.
This commit is contained in:

committed by
GitHub

parent
f44eb13236
commit
09932738e5
@ -14,7 +14,7 @@ class Unread
|
||||
return 0 if @topic_user.last_read_post_number.blank?
|
||||
return 0 if do_not_notify?(@topic_user.notification_level)
|
||||
|
||||
highest_post_number = @guardian.is_staff? ? @topic.highest_staff_post_number : @topic.highest_post_number
|
||||
highest_post_number = @guardian.is_whisperer? ? @topic.highest_staff_post_number : @topic.highest_post_number
|
||||
|
||||
return 0 if @topic_user.last_read_post_number > highest_post_number
|
||||
|
||||
|
Reference in New Issue
Block a user