Skip to content

Commit

Permalink
chore: Remove unnecessary fields from notification payload (#4403)
Browse files Browse the repository at this point in the history
  • Loading branch information
muhsin-k committed Apr 6, 2022
1 parent 75ce534 commit c2afdd5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/models/notification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,15 @@ def push_event_data

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

Expand Down

0 comments on commit c2afdd5

Please sign in to comment.