-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Description:
While using the message object example from the Docs page :
{ "alias": "Gruggy", "avatar": "http://res.guggy.com/logo_128.png", "channel": "#general", "emoji": ":smirk:", "roomId": "Xnb2kLD2Pnhdwe3RH", "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](https://google.com/) something and this and that." } ], "image_url": "http://res.guggy.com/logo_128.png", "message_link": "https://google.com", "text": "Yay for gruggy!", "thumb_url": "http://res.guggy.com/logo_128.png", "title": "Attachment Example", "title_link": "https://youtube.com", "title_link_download": true, "ts": "2016-12-09T16:53:06.761Z", "video_url": "http://www.w3schools.com/tags/movie.mp4" } ] }
, the message shows differently on the web client and the app.
The client checks for the 'type' of all the file attachments while the ReactNative app currently does not. This makes differences in presentations like this possible.
Environment Information:
- Rocket.Chat Server Version: 3.11
- Rocket.Chat App Version: 4.14.1
- Device Name: Nexus 6P
- OS Version: Android 11
Steps to reproduce:
Use the above messageObject and look at the resulting message on both the clients.
Expected behavior:
Both the clients to follow the same scheme.
Actual behavior:
The attachment is rendered as an ImageAttachment instead. The image does not load because the url in the example messageobject isn't valid anymore.
Additional context:
Fix PR ready

