Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix for unencrypted rooms too
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy committed Mar 25, 2022
1 parent 7f6e5ca commit 32e9880
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/components/views/messages/MImageBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,9 @@ export default class MImageBody extends React.Component<IBodyProps, IState> {

await loadPromise;

// Rudimentary validation for whether it is animated, only in encrypted rooms where we have the blob
if (this.props.mediaEventHelper.media.isEncrypted) {
const blob = await this.props.mediaEventHelper.sourceBlob.value;
if (!await blobIsAnimated(content.info.mimetype, blob)) {
isAnimated = false;
}
const blob = await this.props.mediaEventHelper.sourceBlob.value;
if (!await blobIsAnimated(content.info.mimetype, blob)) {
isAnimated = false;
}

if (isAnimated) {
Expand Down

0 comments on commit 32e9880

Please sign in to comment.