mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
Invite with message fixes
This commit is contained in:
109
html/src/app.js
109
html/src/app.js
@@ -8346,7 +8346,10 @@ speechSynthesis.getVoices();
|
|||||||
API.hideNotification({
|
API.hideNotification({
|
||||||
notificationId: I.invite.id
|
notificationId: I.invite.id
|
||||||
});
|
});
|
||||||
this.$message('Invite response message sent');
|
this.$message({
|
||||||
|
message: 'Invite response message sent',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
this.sendInviteResponseDialogVisible = false;
|
this.sendInviteResponseDialogVisible = false;
|
||||||
this.sendInviteRequestResponseDialogVisible = false;
|
this.sendInviteRequestResponseDialogVisible = false;
|
||||||
return args;
|
return args;
|
||||||
@@ -8412,7 +8415,10 @@ speechSynthesis.getVoices();
|
|||||||
API.hideNotification({
|
API.hideNotification({
|
||||||
notificationId: D.invite.id
|
notificationId: D.invite.id
|
||||||
});
|
});
|
||||||
this.$message('Invite response message sent');
|
this.$message({
|
||||||
|
message: 'Invite response message sent',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
return args;
|
return args;
|
||||||
});
|
});
|
||||||
this.sendInviteResponseDialogVisible = false;
|
this.sendInviteResponseDialogVisible = false;
|
||||||
@@ -8502,25 +8508,62 @@ speechSynthesis.getVoices();
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
var I = this.sendInviteDialog;
|
var I = this.sendInviteDialog;
|
||||||
if (I.messageType === 'invite') {
|
var J = this.inviteDialog;
|
||||||
I.params.messageSlot = slot;
|
if (J.visible) {
|
||||||
API.sendInvite(I.params, I.userId).catch((err) => {
|
if (this.API.currentUser.status === 'busy' &&
|
||||||
throw err;
|
J.userIds.includes(this.API.currentUser.id) === true) {
|
||||||
}).then((args) => {
|
this.$message({
|
||||||
this.$message('Invite message sent');
|
message: 'You can\'t invite yourself in \'Do Not Disturb\' mode',
|
||||||
return args;
|
type: 'error'
|
||||||
});
|
});
|
||||||
this.sendInviteDialogVisible = false;
|
return;
|
||||||
} else if (I.messageType === 'requestInvite') {
|
}
|
||||||
I.params.requestSlot = slot;
|
var inviteLoop = () => {
|
||||||
API.sendRequestInvite(I.params, I.userId).catch((err) => {
|
if (J.userIds.length > 0) {
|
||||||
throw err;
|
var receiverUserId = J.userIds.shift();
|
||||||
}).then((args) => {
|
API.sendInvite({
|
||||||
this.$message('Request invite message sent');
|
instanceId: J.worldId,
|
||||||
return args;
|
worldId: J.worldId,
|
||||||
});
|
worldName: J.worldName,
|
||||||
this.sendInviteRequestDialogVisible = false;
|
messageSlot: slot
|
||||||
|
}, receiverUserId).finally(inviteLoop);
|
||||||
|
} else {
|
||||||
|
J.loading = false;
|
||||||
|
J.visible = false;
|
||||||
|
this.$message({
|
||||||
|
message: 'Invite message sent',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
inviteLoop();
|
||||||
|
} else {
|
||||||
|
if (I.messageType === 'invite') {
|
||||||
|
I.params.messageSlot = slot;
|
||||||
|
API.sendInvite(I.params, I.userId).catch((err) => {
|
||||||
|
throw err;
|
||||||
|
}).then((args) => {
|
||||||
|
this.$message({
|
||||||
|
message: 'Invite message sent',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
return args;
|
||||||
|
});
|
||||||
|
} else if (I.messageType === 'requestInvite') {
|
||||||
|
I.params.requestSlot = slot;
|
||||||
|
API.sendRequestInvite(I.params, I.userId).catch((err) => {
|
||||||
|
throw err;
|
||||||
|
}).then((args) => {
|
||||||
|
this.$message({
|
||||||
|
message: 'Request invite message sent',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
|
return args;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
this.sendInviteDialogVisible = false;
|
||||||
|
this.sendInviteRequestDialogVisible = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
$app.methods.cancelEditAndSendInvite = function () {
|
$app.methods.cancelEditAndSendInvite = function () {
|
||||||
@@ -8599,7 +8642,7 @@ speechSynthesis.getVoices();
|
|||||||
J.loading = false;
|
J.loading = false;
|
||||||
J.visible = false;
|
J.visible = false;
|
||||||
this.$message({
|
this.$message({
|
||||||
message: 'Invite sent',
|
message: 'Invite message sent',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -8609,15 +8652,21 @@ speechSynthesis.getVoices();
|
|||||||
if (D.messageType === 'invite') {
|
if (D.messageType === 'invite') {
|
||||||
D.params.messageSlot = D.messageSlot;
|
D.params.messageSlot = D.messageSlot;
|
||||||
API.sendInvite(D.params, D.userId).catch((err) => {
|
API.sendInvite(D.params, D.userId).catch((err) => {
|
||||||
throw err;
|
throw err;
|
||||||
}).then((args) => {
|
}).then((args) => {
|
||||||
this.$message('Invite message sent');
|
this.$message({
|
||||||
return args;
|
message: 'Invite message sent',
|
||||||
});
|
type: 'success'
|
||||||
} else if (D.messageType === 'requestInvite') {
|
});
|
||||||
D.params.requestSlot = D.messageSlot;
|
return args;
|
||||||
API.sendRequestInvite(D.params, D.userId).then((args) => {
|
});
|
||||||
this.$message('Request invite message sent');
|
} else if (D.messageType === 'requestInvite') {
|
||||||
|
D.params.requestSlot = D.messageSlot;
|
||||||
|
API.sendRequestInvite(D.params, D.userId).then((args) => {
|
||||||
|
this.$message({
|
||||||
|
message: 'Request invite message sent',
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
return args;
|
return args;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user