This commit is contained in:
Natsumi
2024-05-29 11:16:24 +12:00
parent 79890e4313
commit 90555c0043
2 changed files with 38 additions and 48 deletions

View File

@@ -5489,7 +5489,6 @@ speechSynthesis.getVoices();
nextClearVRCXCacheCheck: 0,
nextDiscordUpdate: 0,
nextAutoStateChange: 0,
autoAcceptInviteRequests: 'Off',
isDiscordActive: false,
isGameRunning: false,
isGameNoVR: true,
@@ -14790,57 +14789,45 @@ speechSynthesis.getVoices();
API.$on('PIPELINE:NOTIFICATION', function (args) {
var ref = args.json;
if (ref.type !== 'requestInvite' || $app.autoAcceptInviteRequests === 'Off')
if (
ref.type !== 'requestInvite' ||
$app.autoAcceptInviteRequests === 'Off'
)
return;
var currentLocation = $app.lastLocation.location;
if ($app.lastLocation.location === 'traveling') {
currentLocation = $app.lastLocationDestination;
}
if (!currentLocation)
return;
if (!currentLocation) return;
var L = this.parseLocation(currentLocation);
switch ($app.autoAcceptInviteRequests) {
case 'All Favorites':
if (!$app.favoriteFriends.some(x => x.id === ref.senderUserId))
break;
this.getCachedWorld({
worldId: L.worldId
}).then((args) => {
this.sendInvite(
{
instanceId: L.tag,
worldId: L.tag,
worldName: args.ref.name,
rsvp: true
},
ref.senderUserId
).then((_args) => {
$app.$message('Auto Invite sent to ' + ref.senderUsername);
return _args;
});
});
break;
case 'Selected Favorites':
if (!$app.localFavoriteFriends.has(ref.senderUserId))
break;
this.getCachedWorld({
worldId: L.worldId
}).then((args) => {
this.sendInvite(
{
instanceId: L.tag,
worldId: L.tag,
worldName: args.ref.name,
rsvp: true
},
ref.senderUserId
).then((_args) => {
$app.$message('Auto Invite sent to ' + ref.senderUsername);
return _args;
});
});
break;
}
if (
$app.autoAcceptInviteRequests === 'All Favorites' &&
!$app.favoriteFriends.some((x) => x.id === ref.senderUserId)
)
return;
if (
$app.autoAcceptInviteRequests === 'Selected Favorites' &&
!$app.localFavoriteFriends.has(ref.senderUserId)
)
return;
this.getCachedWorld({
worldId: L.worldId
}).then((args1) => {
this.sendInvite(
{
instanceId: L.tag,
worldId: L.tag,
worldName: args1.ref.name,
rsvp: true
},
ref.senderUserId
).then((_args) => {
$app.$message(`Auto invite sent to ${ref.senderUsername}`);
return _args;
});
});
});
$app.data.unseenNotifications = [];
@@ -15579,6 +15566,9 @@ speechSynthesis.getVoices();
VRCXStorage.Set('VRCX_CloseToTray', $app.data.isCloseToTray.toString());
await configRepository.remove('VRCX_CloseToTray');
}
if (!(await VRCXStorage.Get('VRCX_DatabaseLocation'))) {
await VRCXStorage.Set('VRCX_DatabaseLocation', '');
}
$app.data.disableWorldDatabase =
(await VRCXStorage.Get('VRCX_DisableWorldDatabase')) === 'true';
$app.methods.saveVRCXWindowOption = async function () {

View File

@@ -232,8 +232,8 @@
"auto_state_change_join_me_or_ask_me": "Join Me / Ask Me",
"auto_state_change_join_me_or_busy": "Join Me / Busy",
"auto_state_change_ask_me_or_busy": "Ask Me / Busy",
"auto_invite_request_accept": "Auto Invite Request Accept",
"auto_invite_request_accept_tooltip": "Automatically accept Invite Requests from Favorite friends",
"auto_invite_request_accept": "Auto Accept Invite Requests",
"auto_invite_request_accept_tooltip": "Automatically accept invite requests from favorite friends",
"auto_invite_request_accept_off": "Off",
"auto_invite_request_accept_favs": "All Favorites",
"auto_invite_request_accept_selected_favs": "Selected Favorites"