mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 08:57:10 -06:00
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
Block a user