mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 13:06:56 +08:00
Revert "DEV: allow plugins to send extra silenced message params"
This reverts commit c3aeb442d7ea9bbd9106fdc85b5cf1700fe81a1a. Broken specs so helping Jeff to revert first.
This commit is contained in:
@ -22,11 +22,6 @@ class UserSilencer
|
|||||||
UserHistory.where(action: UserHistory.actions[:silence_user], post: post).exists?
|
UserHistory.where(action: UserHistory.actions[:silence_user], post: post).exists?
|
||||||
end
|
end
|
||||||
|
|
||||||
# Allow plugins to update and send extra silence message params
|
|
||||||
def silence_message_params
|
|
||||||
{}
|
|
||||||
end
|
|
||||||
|
|
||||||
def silence
|
def silence
|
||||||
hide_posts unless @opts[:keep_posts]
|
hide_posts unless @opts[:keep_posts]
|
||||||
unless @user.silenced_till.present?
|
unless @user.silenced_till.present?
|
||||||
@ -41,7 +36,7 @@ class UserSilencer
|
|||||||
).format
|
).format
|
||||||
|
|
||||||
context = "#{message_type}: '#{post.topic&.title rescue ''}' #{@opts[:reason]}"
|
context = "#{message_type}: '#{post.topic&.title rescue ''}' #{@opts[:reason]}"
|
||||||
SystemMessage.create(@user, message_type, **silence_message_params)
|
SystemMessage.create(@user, message_type)
|
||||||
|
|
||||||
if @by_user
|
if @by_user
|
||||||
log_params = { context: context, details: details }
|
log_params = { context: context, details: details }
|
||||||
|
Reference in New Issue
Block a user