element-web/src/components/views/messages
Slavi Pantaleev 3f60b4336f Do not try to request thumbnails with non-integer widths
Issue described in https://github.com/vector-im/riot-web/issues/9690.

With certain `window.devicePixelRatio` values
(e.g.  `1.5789473684210527`), the calculated thumb width/height
would be a non-integer value.

Passing such values to `client.mxcUrlToHttp()` causes it to
generate URLs to the thumbnail API with non-integer values.
As per the spec, non-integer values are forbidden for that API and a
400 HTTP response is returned (`Query parameter b'width' must be an
integer`).

Fixing matrix-js-sdk's `mxcUrlToHttp()` to sanitize such values
would also be a good idea and likely fix more than just matrix-react-sdk
and riot-web. Still, it feels like matrix-react-sdk should play nice
as well, and not request thumbnails for weird widths/heights.

Signed-off-by: Slavi Pantaleev <slavi@devture.com>
2019-05-27 11:06:10 +03:00
..
DateSeparator.js fix lint 2018-10-24 14:36:08 +02:00
MAudioBody.js Convert image URLs in React to require calls 2019-01-17 22:06:49 -06:00
MessageActionBar.js dont show edit button for messages that are not your own 2019-05-15 15:53:49 +01:00
MessageEvent.js show message editor in textual body instead of replacing event tile 2019-05-17 15:30:07 +01:00
MessageTimestamp.js Mute timestamps for irrelevant updates 2019-05-22 15:18:57 -06:00
MFileBody.js Don't send options we don't need to fetch 2019-03-29 15:48:33 -06:00
MImageBody.js Do not try to request thumbnails with non-integer widths 2019-05-27 11:06:10 +03:00
MStickerBody.js adds validation for fields. 2019-03-12 14:02:54 +00:00
MVideoBody.js rename onWidgetLoad to onHeightChanged 2019-03-07 17:02:19 +01:00
ReactionDimension.js Mute screen readers over reactions 2019-05-16 16:36:23 -06:00
ReactionsRow.js Add a basic tooltip showing who reacted 2019-05-17 12:11:01 +01:00
ReactionsRowButton.js Add a basic tooltip showing who reacted 2019-05-17 12:11:01 +01:00
ReactionsRowButtonTooltip.js Remove reacted with text when shortcode missing 2019-05-21 15:08:11 +01:00
RoomAvatarEvent.js Remove use of deprecated React.PropTypes 2017-12-26 14:03:18 +13:00
RoomCreate.js Support a backup room ID in PermalinkCreator 2019-05-13 14:12:58 -06:00
SenderProfile.js fix lint 2019-05-19 21:00:14 +01:00
TextualBody.js Merge pull request #3004 from matrix-org/bwindels/update-link-previews-after-edit 2019-05-22 14:17:34 +00:00
TextualEvent.js fix lint 2019-05-19 21:00:14 +01:00
UnknownBody.js
ViewSourceEvent.js Fix indent 2019-05-17 17:44:11 +01:00