mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
FEATURE: Create logs for Group Moderator changes (#10271)
This commit is contained in:
@ -621,6 +621,12 @@ class Topic < ActiveRecord::Base
|
||||
TopicStatusUpdater.new(self, user).update!(status, enabled, opts)
|
||||
DiscourseEvent.trigger(:topic_status_updated, self, status, enabled)
|
||||
|
||||
if status == 'closed'
|
||||
StaffActionLogger.new(user).log_topic_closed(self, closed: enabled)
|
||||
elsif status == 'archived'
|
||||
StaffActionLogger.new(user).log_topic_archived(self, archived: enabled)
|
||||
end
|
||||
|
||||
if enabled && private_message? && status.to_s["closed"]
|
||||
group_ids = user.groups.pluck(:id)
|
||||
if group_ids.present?
|
||||
|
Reference in New Issue
Block a user