DEV: Allow tag to be passed in payload to PushNotificationPusher (#14810)

This commit is contained in:
Mark VanLandingham 2021-11-03 14:18:48 -05:00 committed by GitHub
parent 67265a5045
commit d9f02b635d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,7 @@ class PushNotificationPusher
body: payload[:excerpt],
badge: get_badge,
icon: ActionController::Base.helpers.image_url("push-notifications/#{Notification.types[payload[:notification_type]]}.png"),
tag: "#{Discourse.current_hostname}-#{payload[:topic_id]}",
tag: payload[:tag] || "#{Discourse.current_hostname}-#{payload[:topic_id]}",
base_url: Discourse.base_url,
url: payload[:post_url],
hide_when_active: true