Change pushkey_ts to be seconds (fix #2354) (#2358)

This commit is contained in:
Neil Alexander 2022-04-19 09:51:02 +01:00 committed by GitHub
parent abf71649b0
commit 7e745665a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 24 deletions

View file

@ -653,7 +653,7 @@ func (a *UserInternalAPI) PerformPusherSet(ctx context.Context, req *api.Perform
return a.DB.RemovePusher(ctx, req.Pusher.AppID, req.Pusher.PushKey, req.Localpart)
}
if req.Pusher.PushKeyTS == 0 {
req.Pusher.PushKeyTS = gomatrixserverlib.AsTimestamp(time.Now())
req.Pusher.PushKeyTS = int64(time.Now().Second())
}
return a.DB.UpsertPusher(ctx, req.Pusher, req.Localpart)
}