RocketChat / RocketChat/Rocket.Chat
Message Behaviour Changed from 3.10 on
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Message appearance changed from version 3.10 on
Using the API to send some test messages I've found that the message behaviour changed from 3.10 on (3.11 and 3.12 and 3.12.1 act the same way).
On 3.10 we had the following

As 3.11 and up we've got the following result:

Steps to reproduce:
- Send an API call:
I've used the following curl command at file
envia-msg-rc.txt
in short, the curl call below does the "magic":
`
curl -s -H "X-Auth-Token: $AUTHTOKEN"
-H "X-User-Id: $USERID"
-H "Content-type:application/json"
${SERVER}/api/v1/chat.postMessage
-d "{
"alias": "Gruggy",
"avatar": "http://res.guggy.com/logo_128.png\",
"channel": "#${CHANNEL}",
"emoji": "😏",
"text": "Sample message",
"attachments": [
{
"audio_url": "http://www.w3schools.com/tags/horse.mp3",
"author_icon": "https://avatars.githubusercontent.com/u/850391?v=3",
"author_link": "https://rocket.chat/",
"author_name": "Bradley Hilton",
"collapsed": false,
"color": "#ff0000",
"fields": [
{
"short": true,
"title": "Test",
"value": "Testing out something or other"
},
{
"short": true,
"title": "Another Test",
"value": "Link something and this and that."
}
],
"image_url": "https://www.confianca.com.br/media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/1/1/114520-7.jpg.jpg\",
"message_link": "https://google.com\",
"text": "Yay for Manga!",
"thumb_url": "http://individual.icons-land.com/IconsPreview/3D-Food/PNG/128x128/Berry_Strawberry.png\",
"title": "Attachment Example",
"title_link": "https://www.youtube.com/watch?v=9i_9hse_Y08\",
"title_link_download": true,
"ts": "2020-12-09T16:53:06.761Z",
"video_url": "http://www.w3schools.com/tags/movie.mp4\"
}
]
}" | jq '.'
`
Expected behavior:
I expect that the message still displays the same way as it does in 3.10 and below

Actual behavior:
As 3.11 and up we've got the following result:

Server Setup Information:
- Version of Rocket.Chat Server: from 3.10 and up
- Operating System: Linux
- Deployment Method: docker
Client Setup Information
- Desktop App or Browser Version: Google Chrome 87.0.4280.88 (Versão oficial) 64 bits and other versions
- Operating System: Linux
Thanks in advance
LEslie
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by replaying the curl request from envia-msg-rc.txt against the chat.postMessage API and compare the attachment rendering between the stated versions. Trace the message and attachment handling entry points involved in that endpoint. Done means the supplied attachment payload renders as expected without regressing the newer behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100