Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

fix(gateway): drop the invalid group field from FCM android notifications (#1618)

Hampuse956e6fb4a18
diff --git a/fluxer_gateway/src/push/push_fcm_payload.erl b/fluxer_gateway/src/push/push_fcm_payload.erl
index d0583b2b5..fb63c8e05 100644
--- a/fluxer_gateway/src/push/push_fcm_payload.erl
+++ b/fluxer_gateway/src/push/push_fcm_payload.erl
@@ -64,15 +64,14 @@ build_notification_message(DeviceToken, Payload) ->
),
Data = build_notification_data(Payload, Title, Body, Tag, ImageUrl),
Group = resolve_notification_group(maps:get(<<"data">>, Payload, #{}), Tag),
- AndroidNotification = build_android_notification(Tag, ImageUrl, Group),
+ AndroidNotification = build_android_notification(Tag, ImageUrl),
wrap_notification_message(DeviceToken, NotificationBody, Data, AndroidNotification, Group).
--spec build_android_notification(binary(), binary() | undefined, binary()) -> map().
-build_android_notification(Tag, ImageUrl, Group) ->
+-spec build_android_notification(binary(), binary() | undefined) -> map().
+build_android_notification(Tag, ImageUrl) ->
maybe_put(<<"image">>, ImageUrl, #{
<<"channel_id">> => <<"fluxer_default_push">>,
<<"tag">> => Tag,
- <<"group">> => Group,
<<"click_action">> => <<"FLUXER_MESSAGE">>
}).