[NEW] Livechat: added room transfer endpoint to API#11453
[NEW] Livechat: added room transfer endpoint to API#11453hmagarotto wants to merge 6 commits intoRocketChat:developfrom
Conversation
| return RocketChat.API.v1.unauthorized(); | ||
| } | ||
|
|
||
| const rooms = RocketChat.models.Rooms.findOpenByVisitorToken(this.urlParams.visitorToken).fetch(); |
There was a problem hiding this comment.
I'm not sure about this approach.. If you're transfering a Livechat Room to other agent, you need to know which room you want to transfer, don't you think? Otherwise, it looks like a random transfer.
I think that passing the roomId by parameter would be better.
|
|
||
| return RocketChat.API.v1.success({ | ||
| transfered: RocketChat.Livechat.transfer(room, visitor, { | ||
| userId: this.bodyParams.userId, |
There was a problem hiding this comment.
I have some concerns about passing userId by parameter and not using the logged-in user ( this.userId).
There was a problem hiding this comment.
I have a question about the approach you're integrating your bot to Livechat.
We already have some bot's integrated into Livechat, such as Hubot, so a Hubot is a regular user, then the user is defined as a Livechat agent and can interact as a regular agent to Livechat visitors.
In your case, are you using the same approach I described above?
I'll be waiting for your feedback.
Thanks.
Allow transfer a room to one agent using API.
With this feature we can transfer the visitor served by a bot to a human agent.
Post examples: