From dd67b9113af52fd721147751d51b5d5f3f6c342b Mon Sep 17 00:00:00 2001 From: Natsumi Date: Fri, 27 Sep 2024 22:51:55 +1200 Subject: [PATCH] Fix CancelFriendRequest typo --- html/src/app.js | 5 +++-- html/src/repository/database.js | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/html/src/app.js b/html/src/app.js index ac22ebb0..669c6262 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -14731,7 +14731,7 @@ speechSynthesis.getVoices(); } var friendLogHistory = { created_at: new Date().toJSON(), - type: 'CancelFriendRequst', + type: 'CancelFriendRequest', userId: ref.id, displayName: ref.displayName }; @@ -27389,7 +27389,7 @@ speechSynthesis.getVoices(); ); $app.methods.updateDatabaseVersion = async function () { - var databaseVersion = 8; + var databaseVersion = 9; if (this.databaseVersion < databaseVersion) { if (this.databaseVersion) { var msgBox = this.$message({ @@ -27411,6 +27411,7 @@ speechSynthesis.getVoices(); await database.updateTableForGroupNames(); // alter tables to include group name await database.fixBrokenNotifications(); // fix notifications being null await database.fixBrokenGroupChange(); // fix spam group left & name change + await database.fixCancelFriendRequestTypo(); // fix CancelFriendRequst typo await database.vacuum(); // succ await database.setWal(); // https://www.sqlite.org/wal.html await configRepository.setInt( diff --git a/html/src/repository/database.js b/html/src/repository/database.js index 5917577a..70ccbe76 100644 --- a/html/src/repository/database.js +++ b/html/src/repository/database.js @@ -2610,6 +2610,12 @@ class Database { } } + async fixCancelFriendRequestTypo() { + await sqliteService.executeNonQuery( + `UPDATE ${Database.userPrefix}_friend_log_history SET type = 'CancelFriendRequest' WHERE type = 'CancelFriendRequst'` + ); + } + async vacuum() { await sqliteService.executeNonQuery('VACUUM'); }