appleboy / gorush

A push notification server written in Go (Golang).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Huawei "SendMessage" result processing

selimgul opened this issue · comments

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)

commented

You can make a PR