server: don't invalidate token on connection settings change

This commit is contained in:
Jesse Chan
2021-01-27 09:00:41 +08:00
parent 402a5b8a69
commit 07070dfeb1
+3 -1
View File
@@ -147,7 +147,9 @@ class Users {
patch.password = await hashPassword(patch.password);
}
patch.timestamp = Math.ceil(Date.now() / 1000);
if (Object.keys(patch).length > 1 || patch.client == null) {
patch.timestamp = Math.ceil(Date.now() / 1000);
}
return this.db.update({username}, {$set: patch}, {}).then((numUsersUpdated) => {
if (numUsersUpdated === 0) {