firebase-admin-go icon indicating copy to clipboard operation
firebase-admin-go copied to clipboard

Fix (#688): Updated JSON tag for ChannelID field in AndroidConfig.Notification

Open Surya-7890 opened this issue 6 months ago • 0 comments
trafficstars

In the try it out example in , we can see that the channelId field in android.notification is in camel case,

{
  message: {
      android: {
          notification: {
              channelId: ""
          }
      }
  }
}

While in the SDK, the json tag for that field is set to the following

ype AndroidNotification struct {
        // ... other fields
	ChannelID             string                        `json:"channel_id,omitempty"`
}

FIx: Modified the occurances of this fields

https://github.com/firebase/firebase-admin-go/blob/570427a0f270b9adb061f54187a2b033548c3c9e/messaging/messaging.go#L180

and

https://github.com/firebase/firebase-admin-go/blob/570427a0f270b9adb061f54187a2b033548c3c9e/messaging/messaging_test.go#L227

Surya-7890 avatar Apr 26 '25 05:04 Surya-7890