Pass the decryptedUrl to the MFileBody so that it doesn't need to decrypt it itself.
Conflicts: src/components/views/messages/MImageBody.js
This commit is contained in:
parent
736ab743ee
commit
de384480c6
4 changed files with 7 additions and 5 deletions
|
@ -81,7 +81,7 @@ export default class MAudioBody extends React.Component {
|
||||||
return (
|
return (
|
||||||
<span className="mx_MAudioBody">
|
<span className="mx_MAudioBody">
|
||||||
<audio src={contentUrl} controls />
|
<audio src={contentUrl} controls />
|
||||||
<MFileBody {...this.props} />
|
<MFileBody {...this.props} decryptedUrl={this.state.decryptedUrl} />
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
return {
|
return {
|
||||||
decryptedUrl: null,
|
decryptedUrl: (this.props.decryptedUrl ? this.props.decryptedUrl : null),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,9 @@ limitations under the License.
|
||||||
|
|
||||||
var React = require('react');
|
var React = require('react');
|
||||||
var filesize = require('filesize');
|
var filesize = require('filesize');
|
||||||
var MFileBody = require('./MFileBody');
|
|
||||||
|
import MFileBody from './MFileBody';
|
||||||
|
|
||||||
var MatrixClientPeg = require('../../../MatrixClientPeg');
|
var MatrixClientPeg = require('../../../MatrixClientPeg');
|
||||||
var ImageUtils = require('../../../ImageUtils');
|
var ImageUtils = require('../../../ImageUtils');
|
||||||
var Modal = require('../../../Modal');
|
var Modal = require('../../../Modal');
|
||||||
|
@ -182,7 +184,7 @@ module.exports = React.createClass({
|
||||||
onMouseEnter={this.onImageEnter}
|
onMouseEnter={this.onImageEnter}
|
||||||
onMouseLeave={this.onImageLeave} />
|
onMouseLeave={this.onImageLeave} />
|
||||||
</a>
|
</a>
|
||||||
<MFileBody {...this.props} />
|
<MFileBody {...this.props} decryptedUrl={this.state.decryptedUrl} />
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
} else if (content.body) {
|
} else if (content.body) {
|
||||||
|
|
|
@ -147,7 +147,7 @@ module.exports = React.createClass({
|
||||||
controls preload={preload} autoPlay={false}
|
controls preload={preload} autoPlay={false}
|
||||||
height={height} width={width} poster={poster}>
|
height={height} width={width} poster={poster}>
|
||||||
</video>
|
</video>
|
||||||
<MFileBody {...this.props} />
|
<MFileBody {...this.props} decryptedUrl={this.state.decryptedUrl} />
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue