diff --git a/lib/client.js b/lib/client.js index b4932c3f4..5c007db15 100644 --- a/lib/client.js +++ b/lib/client.js @@ -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);