From 135546467db64851557508e8b5954f11819dcc21 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Thu, 23 Nov 2023 16:11:38 +0100 Subject: [PATCH] =?UTF-8?q?Envoi=20de=20message=20=C3=A0=20plusieurs=20act?= =?UTF-8?q?eurs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/chat-utility.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/module/chat-utility.js b/module/chat-utility.js index 7c244a4f..81c033da 100644 --- a/module/chat-utility.js +++ b/module/chat-utility.js @@ -14,8 +14,8 @@ export class ChatUtility { case "msg_user_ui_notifications": return ChatUtility.onNotifyUser(sockmsg.data); } } - - + + /* -------------------------------------------- */ static notifyUser(userId, level = 'info', message) { const socketData = { @@ -71,7 +71,7 @@ export class ChatUtility { } static removeChatMessageId(messageId) { - if (messageId){ + if (messageId) { ChatUtility.removeMessages({ messageId: messageId }); } } @@ -118,9 +118,10 @@ export class ChatUtility { } /* -------------------------------------------- */ - static getWhisperRecipientsAndGMs(name) { - let recep1 = ChatMessage.getWhisperRecipients(name) || []; - return recep1.concat(ChatMessage.getWhisperRecipients('GM')); + static getWhisperRecipientsAndGMs(...names) { + let recipients = [...ChatMessage.getWhisperRecipients('GM')] + names.forEach(name => recipients.push(...ChatMessage.getWhisperRecipients(name))) + return recipients } /* -------------------------------------------- */