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

Check m.room.encryption is a state event

- just to be paranoid.
This commit is contained in:
Richard van der Hoff
2016-06-23 18:19:59 +01:00
parent 583ddc3e57
commit 3d2a970457

View File

@@ -641,7 +641,7 @@ MatrixClient.prototype.isEventSenderVerified = function(event) {
*/
function setupCryptoEventHandler(client) {
client.on("event", function(event) {
if (event.getType() != "m.room.encryption") {
if (!event.isState() || event.getType() != "m.room.encryption") {
return;
}
onCryptoEvent(client, event);