Fix agent forward

parent 653994ef
......@@ -45,7 +45,7 @@ Template.visitorForward.events({
if (instance.find('#forwardUser').value) {
transferData.userId = instance.find('#forwardUser').value;
} else if (instance.find('#forwardDepartment').value) {
transferData.deparmentId = instance.find('#forwardDepartment').value;
transferData.departmentId = instance.find('#forwardDepartment').value;
}
Meteor.call('livechat:transfer', transferData, (error, result) => {
......
......@@ -286,7 +286,7 @@ RocketChat.Livechat = {
if (agent && agent.agentId !== room.servedBy._id) {
room.usernames = _.without(room.usernames, room.servedBy.username).concat(agent.username);
RocketChat.models.Rooms.changeAgentByRoomId(room._id, room.usernames, agent);
RocketChat.models.Rooms.changeAgentByRoomId(room._id, agent);
let subscriptionData = {
rid: room._id,
......
......@@ -8,7 +8,7 @@ Meteor.methods({
check(transferData, {
roomId: String,
userId: Match.Optional(String),
deparmentId: Match.Optional(String)
departmentId: Match.Optional(String)
});
const room = RocketChat.models.Rooms.findOneById(transferData.roomId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment