Skip to content

Commit 4c537ce

Browse files
committed
Supply channel to getTeamDomainForMessage
1 parent 197e50c commit 4c537ce

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/BaseSlackHandler.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,12 @@ BaseSlackHandler.prototype.replaceUserIdsWithNames = function(message, token) {
100100
// pass in the response to get user instead.
101101
// Though obviously don't if the response was wrong.
102102
response = res;
103-
return main.getTeamDomainForMessage(res && res.user ? res.user : message);
103+
return main.getTeamDomainForMessage(
104+
{
105+
team_id: (res && res.user ? res : message).team_id,
106+
channel: message.channel,
107+
}
108+
);
104109
}).then((team_domain) => {
105110
const user_id = main.getUserId(id, team_domain);
106111
if (response && response.user && response.user.name) {

0 commit comments

Comments
 (0)