Accept request invite

This commit is contained in:
Natsumi
2021-08-30 10:27:23 +12:00
parent 164dc6c2ab
commit ce86730f2a
2 changed files with 41 additions and 7 deletions

View File

@@ -8155,6 +8155,38 @@ speechSynthesis.getVoices();
});
};
$app.methods.acceptRequestInvite = function (row) {
this.$confirm('Continue? Send Invite', 'Confirm', {
confirmButtonText: 'Confirm',
cancelButtonText: 'Cancel',
type: 'info',
callback: (action) => {
if (action === 'confirm') {
var L = API.parseLocation(this.lastLocation.location);
API.getCachedWorld({
worldId: L.worldId
}).then((args) => {
API.sendInvite(
{
instanceId: this.lastLocation.location,
worldId: this.lastLocation.location,
worldName: args.ref.name,
rsvp: true
},
row.senderUserId
).then((_args) => {
this.$message('Invite sent');
API.hideNotification({
notificationId: row.id
});
return _args;
});
});
}
}
});
};
// Save Table Filters
$app.methods.saveTableFilters = function () {
configRepository.setString(