chore: Strip unnecessary data from push payload (#2924)

This commit is contained in:
Sojan Jose
2021-09-09 13:59:42 +05:30
committed by GitHub
parent 2821777e93
commit 9c4ce9af35
2 changed files with 13 additions and 2 deletions

View File

@@ -60,6 +60,16 @@ class Notification < ApplicationRecord
}
end
def fcm_push_data
{
id: id,
notification_type: notification_type,
primary_actor_id: primary_actor_id,
primary_actor_type: primary_actor_type,
primary_actor: primary_actor.push_event_data.slice(:conversation_id)
}
end
# TODO: move to a data presenter
def push_message_title
case notification_type