From c5fb565484532e955e30cd7b1f3e54dc3fceaf85 Mon Sep 17 00:00:00 2001 From: alexandre Date: Tue, 15 Nov 2022 10:25:33 +0100 Subject: [PATCH] refs #4503 message added --- back/methods/chat/sendCheckingPresence.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/back/methods/chat/sendCheckingPresence.js b/back/methods/chat/sendCheckingPresence.js index 3bc022429..075591969 100644 --- a/back/methods/chat/sendCheckingPresence.js +++ b/back/methods/chat/sendCheckingPresence.js @@ -43,6 +43,9 @@ module.exports = Self => { if (!recipient) throw new Error(`Could not send message "${message}" to worker id ${recipientId} from user ${userId}`); + if (process.env.NODE_ENV == 'test') + message = `[Test:Environment to user ${userId}] ` + message; + await models.Chat.create({ senderFk: sender.id, recipient: `@${recipient.name}`, -- 2.40.1