Fix Huawei issue on nil pointer dereference (#660)

This commit is contained in:
Annthonite Buena 2022-02-12 20:43:47 +08:00 committed by GitHub
parent 4abda2a0cb
commit fb961a1977
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ func GetHuaweiNotification(req *PushNotification) (*model.MessageRequest, error)
} }
setDefaultAndroidNotification := func() { setDefaultAndroidNotification := func() {
if msgRequest.Message.Android == nil { if msgRequest.Message.Android.Notification == nil {
msgRequest.Message.Android.Notification = model.GetDefaultAndroidNotification() msgRequest.Message.Android.Notification = model.GetDefaultAndroidNotification()
} }
} }