1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

support for unpacking megolm keys

This is incredibly hacky at the moment, pending the arrival of ephemeral
events, but it kinda works.
This commit is contained in:
Richard van der Hoff
2016-08-19 16:08:43 +01:00
parent e4bfb3ca32
commit 1159e0911f
5 changed files with 93 additions and 15 deletions

View File

@@ -232,6 +232,14 @@ module.exports.MatrixEvent.prototype = {
return Boolean(this._clearEvent.type);
},
getSenderKey: function() {
if (!this.isEncrypted()) {
return null;
}
var c = this.getWireContent();
return c.sender_key;
},
getUnsigned: function() {
return this.event.unsigned || {};
},