Skip to content

Commit

Permalink
[FIX] Invalid condition on getting next livechat agent over REST API …
Browse files Browse the repository at this point in the history
…endpoint (#13360)
  • Loading branch information
renatobecker authored and sampaiodiego committed Feb 14, 2019
1 parent 212f114 commit b40deba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rocketchat-livechat/server/api/v1/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ RocketChat.API.v1.addRoute('livechat/agent.next/:token', {

const { token } = this.urlParams;
const room = findOpenRoom(token);
if (room) {
if (!room) {
throw new Meteor.Error('invalid-token');
}

Expand Down

0 comments on commit b40deba

Please sign in to comment.