appleboy / gorush

A push notification server written in Go (Golang).
MIT License
8.04k stars 841 forks source link

Huawei "SendMessage" result processing #663

Open ghost opened 2 years ago

ghost commented 2 years ago

There is no "resp.Logs" append code in "notification_hms.go" file as "notification_fcm.go". So, if there is a failure, "FeedbackURL" is not called for informing that error in "notification.go"

I propose to add following lines where "res.Code" is checked for failure, in line 214, "notification_hms.go".

errLog := logPush(cfg, core.FailedPush, req.Tokens[0], req, errors.New(res.Code + "-" + res.Msg)) resp.Logs = append(resp.Logs, errLog)

keremoge commented 2 years ago

You can make a PR