Envoi de message à plusieurs acteurs
This commit is contained in:
parent
b5db2a9ef3
commit
135546467d
@ -14,8 +14,8 @@ export class ChatUtility {
|
|||||||
case "msg_user_ui_notifications": return ChatUtility.onNotifyUser(sockmsg.data);
|
case "msg_user_ui_notifications": return ChatUtility.onNotifyUser(sockmsg.data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static notifyUser(userId, level = 'info', message) {
|
static notifyUser(userId, level = 'info', message) {
|
||||||
const socketData = {
|
const socketData = {
|
||||||
@ -71,7 +71,7 @@ export class ChatUtility {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static removeChatMessageId(messageId) {
|
static removeChatMessageId(messageId) {
|
||||||
if (messageId){
|
if (messageId) {
|
||||||
ChatUtility.removeMessages({ messageId: messageId });
|
ChatUtility.removeMessages({ messageId: messageId });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -118,9 +118,10 @@ export class ChatUtility {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static getWhisperRecipientsAndGMs(name) {
|
static getWhisperRecipientsAndGMs(...names) {
|
||||||
let recep1 = ChatMessage.getWhisperRecipients(name) || [];
|
let recipients = [...ChatMessage.getWhisperRecipients('GM')]
|
||||||
return recep1.concat(ChatMessage.getWhisperRecipients('GM'));
|
names.forEach(name => recipients.push(...ChatMessage.getWhisperRecipients(name)))
|
||||||
|
return recipients
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
Loading…
Reference in New Issue
Block a user