Skip to content

Commit

Permalink
Fix incoming livechat when impersonating an agent
Browse files Browse the repository at this point in the history
  • Loading branch information
sampaiodiego committed Jan 12, 2018
1 parent 21d5b67 commit b669614
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 b669614

Please sign in to comment.