2093 - Mention destinatary sending to department room
gitea/salix/2093-chat_mention_destinatary There was a failure building this commit
Details
gitea/salix/2093-chat_mention_destinatary There was a failure building this commit
Details
This commit is contained in:
parent
f2fdce11cd
commit
f350158806
|
@ -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