mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 22:33:50 +02:00
Bulk invite with message
This commit is contained in:
@@ -8576,9 +8576,39 @@ speechSynthesis.getVoices();
|
||||
|
||||
$app.methods.sendInviteConfirm = function () {
|
||||
var D = this.sendInviteDialog;
|
||||
if (D.messageType === 'invite') {
|
||||
D.params.messageSlot = D.messageSlot;
|
||||
API.sendInvite(D.params, D.userId).catch((err) => {
|
||||
var J = this.inviteDialog;
|
||||
if (J.visible) {
|
||||
if (this.API.currentUser.status === 'busy' &&
|
||||
J.userIds.includes(this.API.currentUser.id) === true) {
|
||||
this.$message({
|
||||
message: 'You can\'t invite yourself in \'Do Not Disturb\' mode',
|
||||
type: 'error'
|
||||
});
|
||||
return;
|
||||
}
|
||||
var inviteLoop = () => {
|
||||
if (J.userIds.length > 0) {
|
||||
var receiverUserId = J.userIds.shift();
|
||||
API.sendInvite({
|
||||
instanceId: J.worldId,
|
||||
worldId: J.worldId,
|
||||
worldName: J.worldName,
|
||||
messageSlot: D.messageSlot
|
||||
}, receiverUserId).finally(inviteLoop);
|
||||
} else {
|
||||
J.loading = false;
|
||||
J.visible = false;
|
||||
this.$message({
|
||||
message: 'Invite sent',
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
};
|
||||
inviteLoop();
|
||||
} else {
|
||||
if (D.messageType === 'invite') {
|
||||
D.params.messageSlot = D.messageSlot;
|
||||
API.sendInvite(D.params, D.userId).catch((err) => {
|
||||
throw err;
|
||||
}).then((args) => {
|
||||
this.$message('Invite message sent');
|
||||
@@ -8588,8 +8618,9 @@ speechSynthesis.getVoices();
|
||||
D.params.requestSlot = D.messageSlot;
|
||||
API.sendRequestInvite(D.params, D.userId).then((args) => {
|
||||
this.$message('Request invite message sent');
|
||||
return args;
|
||||
});
|
||||
return args;
|
||||
});
|
||||
}
|
||||
}
|
||||
this.sendInviteDialogVisible = false;
|
||||
this.sendInviteRequestDialogVisible = false;
|
||||
|
||||
@@ -1227,6 +1227,7 @@ html
|
||||
span(v-else v-text="friend.id")
|
||||
template(#footer)
|
||||
el-button(type="primary" size="small" :disabled="inviteDialog.loading || !inviteDialog.userIds.length" @click="sendInvite()") Invite
|
||||
el-button(type="primary" size="small" :disabled="inviteDialog.loading || !inviteDialog.userIds.length" @click="showSendInviteDialog()") Invite With Message
|
||||
|
||||
//- dialog: social status
|
||||
el-dialog.x-dialog(ref="socialStatusDialog" :visible.sync="socialStatusDialog.visible" title="Social Status" width="400px")
|
||||
|
||||
Reference in New Issue
Block a user