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:
Sam
2013-09-06 14:07:23 +10:00
parent c495a0b996
commit 41a1b6942d
15 changed files with 635 additions and 583 deletions

View File

@ -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