fixes #4503 Añadir opción de rocket si o rocket no #1145

Merged
alexandre merged 3 commits from 4503-opcion-rocket into dev 2022-12-20 06:59:30 +00:00
1 changed files with 3 additions and 0 deletions

View File

@ -43,6 +43,9 @@ module.exports = Self => {
if (!recipient) if (!recipient)
throw new Error(`Could not send message "${message}" to worker id ${recipientId} from user ${userId}`); 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({ await models.Chat.create({
senderFk: sender.id, senderFk: sender.id,
recipient: `@${recipient.name}`, recipient: `@${recipient.name}`,