Disable invite button for friends/invite only instances to reflect API

This commit is contained in:
Natsumi
2021-06-19 09:35:33 +12:00
parent 780a4a71dc
commit bd297deba6
3 changed files with 23 additions and 6 deletions

View File

@@ -12938,6 +12938,17 @@ speechSynthesis.getVoices();
return text;
};
$app.methods.checkCanInvite = function (location) {
var L = API.parseLocation(location);
if ((L.accessType === 'invite') || (L.accessType === 'friends')) {
if (L.userId === API.currentUser.id) {
return false;
}
return true;
}
return false;
};
$app = new Vue($app);
window.$app = $app;
}());