Skip to content

Commit

Permalink
Fix MM 56723 (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
larkox committed Apr 24, 2024
1 parent ce92120 commit ceed7ff
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/android_notification_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,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
Expand Down
6 changes: 6 additions & 0 deletions server/apple_notification_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,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)
}
Expand Down
1 change: 1 addition & 0 deletions server/push_notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,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"`
}

0 comments on commit ceed7ff

Please sign in to comment.