You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-29 16:43:09 +03:00
Check m.room.encryption is a state event
- just to be paranoid.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user