chore: Remove unnecessary fields from notification payload (#4403)

This commit is contained in:
Muhsin Keloth 2022-04-07 00:07:53 +05:30 committed by GitHub
parent 75ce5345a9
commit c2afdd5c93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,9 +64,15 @@ class Notification < ApplicationRecord
def primary_actor_data
if %w[assigned_conversation_new_message conversation_mention].include? notification_type
primary_actor.conversation.push_event_data
{
id: primary_actor.conversation.push_event_data[:id],
meta: primary_actor.conversation.push_event_data[:meta]
}
else
primary_actor.push_event_data
{
id: primary_actor.push_event_data[:id],
meta: primary_actor.push_event_data[:meta]
}
end
end