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:
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.
Closing in favor of: RocketChat/Rocket.Chat#18474