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) {
|
function setupCryptoEventHandler(client) {
|
||||||
client.on("event", function(event) {
|
client.on("event", function(event) {
|
||||||
if (event.getType() != "m.room.encryption") {
|
if (!event.isState() || event.getType() != "m.room.encryption") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
onCryptoEvent(client, event);
|
onCryptoEvent(client, event);
|
||||||
|
|||||||
Reference in New Issue
Block a user