Fix CancelFriendRequest typo

This commit is contained in:
Natsumi
2024-09-27 22:51:55 +12:00
parent 696f0a915c
commit dd67b9113a
2 changed files with 9 additions and 2 deletions

View File

@@ -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(

View File

@@ -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');
}