From 152347c65d1bfcaae5be4c48b16c2707b7096fee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Espino=20Garc=C3=ADa?= Date: Tue, 2 Apr 2024 12:14:49 +0200 Subject: [PATCH] Fix MM 56723 --- server/android_notification_server.go | 6 ++++++ server/apple_notification_server.go | 6 ++++++ server/push_notification.go | 1 + 3 files changed, 13 insertions(+) diff --git a/server/android_notification_server.go b/server/android_notification_server.go index 66f7f7f..2d17aca 100644 --- a/server/android_notification_server.go +++ b/server/android_notification_server.go @@ -129,6 +129,12 @@ func (me *AndroidNotificationServer) SendNotification(msg *PushNotification) Pus data["root_id"] = msg.RootID } + if msg.Signature == "" { + data["signature"] = "NO_SIGNATURE" + } else { + data["signature"] = msg.Signature + } + if msg.IsIDLoaded { data["post_id"] = msg.PostID data["message"] = msg.Message diff --git a/server/apple_notification_server.go b/server/apple_notification_server.go index 80aa8e4..8deef2b 100644 --- a/server/apple_notification_server.go +++ b/server/apple_notification_server.go @@ -186,6 +186,12 @@ func (me *AppleNotificationServer) SendNotification(msg *PushNotification) PushR } } + if msg.Signature == "" { + data.Custom("signature", "NO_SIGNATURE") + } else { + data.Custom("signature", msg.Signature) + } + if msg.TeamID != "" { data.Custom("team_id", msg.TeamID) } diff --git a/server/push_notification.go b/server/push_notification.go index 269e4b4..6f0b187 100644 --- a/server/push_notification.go +++ b/server/push_notification.go @@ -50,4 +50,5 @@ type PushNotification struct { ContentAvailable int `json:"cont_ava"` IsCRTEnabled bool `json:"is_crt_enabled"` IsIDLoaded bool `json:"is_id_loaded"` + Signature string `json:"signature"` }