Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

LiveChat-Widget adds an extra URL prefix when sending image URL

Open SangyulCha opened this issue 3 years ago • 1 comments

Description:

I am developing a Rocket.Chat App using the AppEngine. When using the LiveChat-Widget to forward an image or audio from an external source (like botpress), it somehow adds an extra URL prefix. Is there a way to force LiveChat-Widget to not add the prefix?

Steps to reproduce:

  1. create an IMessageAttachment object with an image URL
  2. add object as an attachment to IMessageBuilder
  3. send message to LiveChat

Expected behavior:

expected

  • Bot send the Image correctly (I logged in bot account and sent the image and audio manually)

Actual behavior:

problem

  • The correct imageUrl is "http://localhost:3001/api/v1/bots/lab/media/see8z47e13k5o43aaovn-cat.png" but sent imageUrl is wrong as you can see in Elements. (I think LiveChat-Widget added "http://localhost:3000" to original Url)

cat_image_in_rc

  • But as you can see in Rocket.Chat, actually bot sent the image correctly

Server Setup Information:

  • Version of Rocket.Chat Server: 4.8.0
  • Operating System: Ubuntu 22.04.1 LTS
  • Deployment Method: Docker
  • Number of Running Instances: 7
  • DB Replicaset Oplog: Enabled
  • NodeJS Version: 14.18.3
  • MongoDB Version: 4.4.14

Client Setup Information

  • Desktop App or Browser Version: Chrome 104.0.5112.79 (Official Build) (64-bit)
  • Operating System:

SangyulCha avatar Aug 08 '22 16:08 SangyulCha

Hey, Would love to work, assign it to me. I am pretty new to this project. Can anyone point me out on what folder to look at. Thanks!

Nabhag8848 avatar Sep 08 '22 04:09 Nabhag8848