mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 16:33:01 +08:00
DEV: add "pre_notification_alert" event
Allows plugins to modify payload before sending a notification alert
This commit is contained in:
parent
24fd710f04
commit
6bbdf5b56e
|
@ -434,6 +434,7 @@ class PostAlerter
|
|||
post_url: post_url
|
||||
}
|
||||
|
||||
DiscourseEvent.trigger(:pre_notification_alert, user, payload)
|
||||
MessageBus.publish("/notification-alert/#{user.id}", payload, user_ids: [user.id])
|
||||
push_notification(user, payload)
|
||||
DiscourseEvent.trigger(:post_notification_alert, user, payload)
|
||||
|
|
Loading…
Reference in New Issue
Block a user