Skip to content

Commit

Permalink
Merge pull request #9393 from RocketChat/livechat-fix-impersonated-agent
Browse files Browse the repository at this point in the history
[FIX] Fix incoming livechat when impersonating an agent
  • Loading branch information
rodrigok authored Jan 17, 2018
2 parents ec46ebd + b669614 commit 9596def
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ this.ChatMessages = class ChatMessages {
const currentAgent = !visitor.roomSubscribed && Livechat.agent;
if (currentAgent) {
agent = {
_id: currentAgent._id,
agentId: currentAgent._id,
username: currentAgent.username
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ Meteor.methods({
check(rid, String);
check(msg, String);

check(agent, Match.Maybe({
agentId: String,
username: String
}));

const guest = LivechatVisitors.getVisitorByToken(token, {
fields: {
name: 1,
Expand Down

0 comments on commit 9596def

Please sign in to comment.