Add DiscourseEvents for when users as unsuspended/unsilenced
This commit is contained in:
parent
667af9debd
commit
242a5fc5ef
|
@ -156,6 +156,8 @@ class Admin::UsersController < Admin::AdminController
|
|||
@user.save!
|
||||
StaffActionLogger.new(current_user).log_user_unsuspend(@user)
|
||||
|
||||
DiscourseEvent.trigger(:user_unsuspended, user: @user)
|
||||
|
||||
render_json_dump(
|
||||
suspension: {
|
||||
suspended: false
|
||||
|
|
|
@ -71,6 +71,7 @@ class UserSilencer
|
|||
def unsilence
|
||||
@user.silenced_till = nil
|
||||
if @user.save
|
||||
DiscourseEvent.trigger(:user_unsilenced, user: @user)
|
||||
SystemMessage.create(@user, :unsilenced)
|
||||
StaffActionLogger.new(@by_user).log_unsilence_user(@user) if @by_user
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue