mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 22:35:03 +08:00
notify moderators now goes to the "community" user, that saves our poor mods from a flood of pms
if any staff respond to a pm they are automatically added to the list of recipients and will start getting email notifications
This commit is contained in:
@ -69,6 +69,7 @@ class PostCreator
|
||||
update_topic_stats
|
||||
update_user_counts
|
||||
publish
|
||||
ensure_in_allowed_users if guardian.is_staff?
|
||||
@post.advance_draft_sequence
|
||||
@post.save_reply_relationships
|
||||
end
|
||||
@ -104,6 +105,14 @@ class PostCreator
|
||||
|
||||
protected
|
||||
|
||||
def ensure_in_allowed_users
|
||||
return unless @topic.private_message?
|
||||
|
||||
unless @topic.topic_allowed_users.where(user_id: @user.id).exists?
|
||||
@topic.topic_allowed_users.create!(user_id: @user.id)
|
||||
end
|
||||
end
|
||||
|
||||
def secure_group_ids(topic)
|
||||
@secure_group_ids ||= if topic.category && topic.category.read_restricted?
|
||||
topic.category.secure_group_ids
|
||||
|
Reference in New Issue
Block a user