chore: unsigned value is always non-negative

This unsigned value is always non-negative, and hence cannot be less than 0.
This commit is contained in:
Bo-Yi Wu 2020-12-13 22:10:53 +08:00
parent 4ec672923f
commit f32e5e838b
1 changed files with 1 additions and 1 deletions

View File

@ -173,7 +173,7 @@ func CheckMessage(req PushNotification) error {
}
// ref: https://firebase.google.com/docs/cloud-messaging/http-server-ref
if req.Platform == PlatFormAndroid && req.TimeToLive != nil && (*req.TimeToLive < uint(0) || uint(2419200) < *req.TimeToLive) {
if req.Platform == PlatFormAndroid && req.TimeToLive != nil && *req.TimeToLive > uint(2419200) {
msg = "the message's TimeToLive field must be an integer " +
"between 0 and 2419200 (4 weeks)"
LogAccess.Debug(msg)