RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.09k stars 10.35k forks source link

user avatar not used in integration #8763

Open wonkaba opened 6 years ago

wonkaba commented 6 years ago

Description:

I have an integration coming in from a Webhook from Gitlab. The Gitlab JSON body that gitlab creates contains a field called "user-avatar" and is mapped to the local location of the Gitlab users avatar. When this field is present in the JSON string RocketChat will not display the avatar of the User I set up in the integration. Setting the "Avatar Url" to override the default Avatar used also does nothing and continues to ignore the RocketChat user's avatar in the integration messages.

The JSON String produced by GitLab contains information like this: {"user_name": "joe user", "user_username": "joeUser", "user_email": "joeUser@joe.user.com", "user_avatar": "/uploads/-/system/user/avatar/29/avatar.png"}

If the POST is sent without the "user-avatar" field, the correct Avatar shows as expected.

Server Setup Information:

Steps to Reproduce:

  1. Create an Rocketchat integration and set a PostAs user to someone with an avatar
  2. Configure a Webhook integration in a Gitlab project.
  3. Have a user with an Avatar perform an action in the Repo that will trigger a Webhook send to Rocketchat.

Expected behavior:

Message coming in from Gitlab will be from the Set user of the RocketChat integration

Actual behavior:

No Avatar is shown

graywolf336 commented 6 years ago

The expected image url field is avatar.

So, maybe edit the integration or create a script to adjust that field and then it will work. :)