2093 - Mention destinatary sending to department room
This commit is contained in:
parent
375807dec4
commit
d481b0c71f
|
@ -41,11 +41,11 @@ module.exports = Self => {
|
||||||
});
|
});
|
||||||
const department = workerDepartment.department();
|
const department = workerDepartment.department();
|
||||||
const channelName = department.chatName;
|
const channelName = department.chatName;
|
||||||
room = `#${channelName}`;
|
|
||||||
|
|
||||||
if (channelName)
|
if (channelName) {
|
||||||
|
message = `@${account.name} => ${message}`;
|
||||||
room = `#${channelName}`;
|
room = `#${channelName}`;
|
||||||
else room = `@${account.name}`;
|
} else room = `@${account.name}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Self.send(ctx, room, message);
|
return Self.send(ctx, room, message);
|
||||||
|
|
|
@ -38,7 +38,7 @@ describe('chat sendCheckingPresence()', () => {
|
||||||
|
|
||||||
expect(response.statusCode).toEqual(200);
|
expect(response.statusCode).toEqual(200);
|
||||||
expect(response.message).toEqual('Fake notification sent');
|
expect(response.message).toEqual('Fake notification sent');
|
||||||
expect(chatModel.send).toHaveBeenCalledWith(ctx, '#cooler', 'I changed something');
|
expect(chatModel.send).toHaveBeenCalledWith(ctx, '#cooler', '@HankPym => I changed something');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should call to send() method with the worker username when the worker is working`, async() => {
|
it(`should call to send() method with the worker username when the worker is working`, async() => {
|
||||||
|
|
Loading…
Reference in New Issue