Skip to content
Snippets Groups Projects
Unverified Commit 883db06b authored by Diego Sampaio's avatar Diego Sampaio
Browse files

Fix conversion

parent 4c41f378
No related branches found
Tags 6.2.10
No related merge requests found
......@@ -10,7 +10,7 @@ RocketChat.sendMessage = function(user, message, room, upsert = false) {
message.msg = '';
}
message.rid = room._id;
if (room.usernames || room.usernames.length === 0) {
if (!room.usernames || room.usernames.length === 0) {
const updated_room = RocketChat.models.Rooms.findOneById(room._id);
if (updated_room != null) {
room = updated_room;
......
......@@ -44,7 +44,7 @@ Template.switchDepartment.events({
closeOnConfirm: true,
html: false
}, () => {
Meteor.call('livechat:closeByVisitor', (error) => {
Meteor.call('livechat:closeByVisitor', visitor.getRoom(), (error) => {
if (error) {
return console.log('Error ->', error);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment