Add account_warning notification
This commit is contained in:
parent
af86c09824
commit
e7492e0745
9 changed files with 70 additions and 3 deletions
|
@ -17,6 +17,7 @@ class Admin::StatusBatchAction
|
|||
|
||||
def save!
|
||||
process_action!
|
||||
notify!
|
||||
end
|
||||
|
||||
private
|
||||
|
@ -157,6 +158,10 @@ class Admin::StatusBatchAction
|
|||
report.save!
|
||||
end
|
||||
|
||||
def notify!
|
||||
LocalNotificationWorker.perform_async(target_account.id, @warning.id, 'AccountWarning', 'warning') if warnable? && @warning
|
||||
end
|
||||
|
||||
def report
|
||||
@report ||= Report.find(report_id) if report_id.present?
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue