-
-
Notifications
You must be signed in to change notification settings - Fork 869
Description
Hello!
When you migrate to official FCM client, field type Data in message changed from map[string]interface{}
to map[string]string
. And you changed json.Marshall(message)
to fcm message structure. And nested structures in Data
field now converting to golang structures.
Bug here:
https://github.com/appleboy/gorush/blob/master/notify/notification_fcm.go#L95
See how Sprintf works with maps:
https://go.dev/play/p/MvW0VpkGM3v
If i send structure like this:
{
"data": {
"someField": {
"innerField": "test",
"innerField2": "test",
}
}
}
It will be converted to incorrect string:
someField = "map[field1:test field2:test]"
I propose solution for better backward compatibility with json.Marshall
for non-string fields. I'll create PR
Metadata
Metadata
Assignees
Labels
No labels