Skip to content

Commit 5afe050

Browse files
author
vikasrohit
authored
Fixing issue with coder bot user details call
if message is posted by the coder bot, use useId of the predefined system user i.e. tcwebserivce, for fetching more details about the user
1 parent 126e30d commit 5afe050

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

connect/connectNotificationServer.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,12 @@ const handler = (topic, message, logger, callback) => {
455455
const ids = [];
456456
logger.debug(message.initiatorUserId, 'message.initiatorUserId');
457457
if (message.initiatorUserId) {
458-
ids.push(message.initiatorUserId);
458+
// if message is posted by the coder bot, use useId of the predefined system user i.e. tcwebserivce
459+
if (botIds.indexOf(message.userId.toString()) !== -1) {
460+
ids.push(config.TCWEBSERVICE_ID);
461+
} else {
462+
ids.push(message.initiatorUserId);
463+
}
459464
}
460465
// if message has userId such messages will likely need userHandle and user full name
461466
// so let's get it

0 commit comments

Comments
 (0)