You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-08-06 10:22:45 +03:00
Merge pull request #556 from matrix-org/rav/decrypt_after_keys_arrive
Update eventtiles when the events are decrypted
This commit is contained in:
@@ -146,6 +146,7 @@ module.exports = WithMatrixClient(React.createClass({
|
|||||||
this._suppressReadReceiptAnimation = false;
|
this._suppressReadReceiptAnimation = false;
|
||||||
this.props.matrixClient.on("deviceVerificationChanged",
|
this.props.matrixClient.on("deviceVerificationChanged",
|
||||||
this.onDeviceVerificationChanged);
|
this.onDeviceVerificationChanged);
|
||||||
|
this.props.mxEvent.on("Event.decrypted", this._onDecrypted);
|
||||||
},
|
},
|
||||||
|
|
||||||
componentWillReceiveProps: function (nextProps) {
|
componentWillReceiveProps: function (nextProps) {
|
||||||
@@ -170,6 +171,15 @@ module.exports = WithMatrixClient(React.createClass({
|
|||||||
var client = this.props.matrixClient;
|
var client = this.props.matrixClient;
|
||||||
client.removeListener("deviceVerificationChanged",
|
client.removeListener("deviceVerificationChanged",
|
||||||
this.onDeviceVerificationChanged);
|
this.onDeviceVerificationChanged);
|
||||||
|
this.props.mxEvent.removeListener("Event.decrypted", this._onDecrypted);
|
||||||
|
},
|
||||||
|
|
||||||
|
/** called when the event is decrypted after we show it.
|
||||||
|
*/
|
||||||
|
_onDecrypted: function() {
|
||||||
|
// we need to re-verify the sending device.
|
||||||
|
this._verifyEvent(this.props.mxEvent);
|
||||||
|
this.forceUpdate();
|
||||||
},
|
},
|
||||||
|
|
||||||
onDeviceVerificationChanged: function(userId, device) {
|
onDeviceVerificationChanged: function(userId, device) {
|
||||||
|
Reference in New Issue
Block a user