Android: Set request message if body is empty
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
79dace4485
commit
5941373bae
|
@ -232,8 +232,10 @@ func pushNotificationAndroid(req RequestPushNotification) bool {
|
|||
|
||||
notification.Notification = &req.Notification
|
||||
|
||||
// overwrite notification body
|
||||
// Set request message if body is empty
|
||||
if len(notification.Notification.Body) == 0 {
|
||||
notification.Notification.Body = req.Message
|
||||
}
|
||||
|
||||
res, err := gcm.SendHttp("api key", notification)
|
||||
|
||||
|
|
Loading…
Reference in New Issue