RocketChat / Rocket.Chat.Apps-engine

The Rocket.Chat Apps engine and definitions.

Home Page:https://rocketchat.github.io/Rocket.Chat.Apps-engine/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when a file is uploaded by a Livechat visitor

renatobecker opened this issue · comments

When a livechat end-user(visitor) uploads a file the following error is raised:

Screen Shot 2020-08-01 at 20 23 12

I took a look at the code and I guess I found the reason for the error:
https://github.com/RocketChat/Rocket.Chat/blob/develop/app/apps/server/converters/uploads.js#L56

Instead of:
const result = this.orch.getConverters().get('users').convertByToken(upload.visitorToken);

it should be:
const result = this.orch.getConverters().get('visitor').convertByToken(upload.visitorToken);

Can you confirm that applying this change solves your problem?

Can you confirm that applying this change solves your problem?

Yeah, we applied the suggested changes locally and everything worked fine.

Right, so would you like us to open the PR with those changes? Or would you rather do it, since you already have it applied?

Right, so would you like us to open the PR with those changes? Or would you rather do it, since you already have it applied?

I can handle it, no worries.
Thanks.