DEV: Plugin instance method for push_notification_filters (#14787)

This commit is contained in:
Mark VanLandingham
2021-11-03 12:21:33 -05:00
committed by GitHub
parent 836c0f5ffe
commit 67265a5045
5 changed files with 36 additions and 24 deletions

View File

@ -950,6 +950,12 @@ class Plugin::Instance
DiscoursePluginRegistry.register_presence_channel_prefix([prefix, block], self)
end
# Registers a new push notification filter. User and notification payload are passed into block, and if all
# filters return `true`, the push notification will be sent.
def register_push_notification_filter(&block)
DiscoursePluginRegistry.register_push_notification_filter(block, self)
end
# Register a ReviewableScore setting_name associated with a reason.
# We'll use this to build a site setting link and add it to the reason's translation.
#