This commit is contained in:
Natsumi
2021-05-27 01:04:18 +12:00
parent 31e34deb52
commit 983cf41107
3 changed files with 14 additions and 5 deletions

View File

@@ -3274,7 +3274,6 @@ speechSynthesis.getVoices();
userId: content.userId
}
});
$app.APILastOnline.set(content.userId, Date.now());
break;
case 'friend-active':
@@ -5136,6 +5135,9 @@ speechSynthesis.getVoices();
});
API.$on('FRIEND:STATE', function (args) {
if (args.json.state === 'online') {
$app.APILastOnline.set(args.params.userId, Date.now());
}
$app.updateFriend(args.params.userId, args.json.state);
});
@@ -11574,6 +11576,13 @@ speechSynthesis.getVoices();
}
};
API.$on('NOTIFICATION', function (args) {
var { json } = args;
if (json.type === 'invite') {
$app.inviteDownloadWorldCache(json);
}
});
$app.methods.inviteDownloadWorldCache = function (invite) {
if ((this.worldAutoCacheInvite === 'Always') ||
((this.worldAutoCacheInvite === 'Game Closed') && (!this.isGameRunning)) ||