From fb961a19777074daef058e852c1b4f50b5c805e8 Mon Sep 17 00:00:00 2001 From: Annthonite Buena <36940626+annthonite@users.noreply.github.com> Date: Sat, 12 Feb 2022 20:43:47 +0800 Subject: [PATCH] Fix Huawei issue on nil pointer dereference (#660) --- notify/notification_hms.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notify/notification_hms.go b/notify/notification_hms.go index 1bdfc15..076dc87 100644 --- a/notify/notification_hms.go +++ b/notify/notification_hms.go @@ -123,7 +123,7 @@ func GetHuaweiNotification(req *PushNotification) (*model.MessageRequest, error) } setDefaultAndroidNotification := func() { - if msgRequest.Message.Android == nil { + if msgRequest.Message.Android.Notification == nil { msgRequest.Message.Android.Notification = model.GetDefaultAndroidNotification() } }