Skip to content

Commit

Permalink
Fix 2FA dialog not opening & notifications table
Browse files Browse the repository at this point in the history
  • Loading branch information
Natsumi-sama committed Oct 11, 2024
1 parent bbf1115 commit 162cff5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions html/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,17 @@ speechSynthesis.getVoices();
this.$emit('AUTOLOGIN');
throw new Error('401: Missing Credentials');
}
if (
status === 401 &&
data.error.message === '"Unauthorized"' &&
endpoint !== 'auth/user'
) {
// trigger 2FA dialog
if (!$app.twoFactorAuthDialogVisible) {
$app.API.getCurrentUser();
}
throw new Error('401: Unauthorized');
}
if (status === 403 && endpoint.substring(0, 6) === 'config') {
$app.$alert(
'VRChat currently blocks most VPNs. Please disable any connected VPNs and try again.',
Expand Down
2 changes: 1 addition & 1 deletion html/src/repository/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ class Database {
row.$isExpired = true;
}
notifications.unshift(row);
}, `SELECT * FROM ${Database.userPrefix}_notifications ORDER BY id DESC LIMIT ${Database.maxTableSize}`);
}, `SELECT * FROM ${Database.userPrefix}_notifications ORDER BY created_at DESC LIMIT ${Database.maxTableSize}`);
return notifications;
}

Expand Down

0 comments on commit 162cff5

Please sign in to comment.