mirror of https://github.com/vector-im/riot-web
Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>t3chguy/msc-is-animated
parent
5a09b081d7
commit
1c3379898e
|
@ -298,10 +298,14 @@ export default class MImageBody extends React.Component<IBodyProps, IState> {
|
|||
}
|
||||
|
||||
try {
|
||||
const blob = await this.props.mediaEventHelper!.sourceBlob.value;
|
||||
// If we didn't receive the MSC4230 is_animated flag
|
||||
// then we need to check if the image is animated by downloading it.
|
||||
if (
|
||||
content.info?.["org.matrix.msc4230.is_animated"] === false ||
|
||||
!(await blobIsAnimated(content.info?.mimetype, blob))
|
||||
!(await blobIsAnimated(
|
||||
content.info?.mimetype,
|
||||
await this.props.mediaEventHelper!.sourceBlob.value,
|
||||
))
|
||||
) {
|
||||
isAnimated = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue