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
Hello! When you migrate to official FCM client, field type Data in message changed from
map[string]interface{}
tomap[string]string
. And you changedjson.Marshall(message)
to fcm message structure. And nested structures inData
field now converting to golang structures. Bug here: https://github.com/appleboy/gorush/blob/master/notify/notification_fcm.go#L95See how Sprintf works with maps: https://go.dev/play/p/MvW0VpkGM3v
If i send structure like this:
It will be converted to incorrect string:
I propose solution for better backward compatibility with
json.Marshall
for non-string fields. I'll create PR