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

Use native Object and Array methods (#1693)

This commit is contained in:
Germain
2021-05-13 17:20:09 +01:00
committed by GitHub
parent 4e5442d972
commit 9a9ed124f5
19 changed files with 67 additions and 445 deletions

View File

@@ -1076,7 +1076,7 @@ MegolmEncryption.prototype._removeUnknownDevices = function(devicesInRoom) {
*/
MegolmEncryption.prototype._getDevicesInRoom = async function(room) {
const members = await room.getEncryptionTargetMembers();
const roomMembers = utils.map(members, function(u) {
const roomMembers = members.map(function(u) {
return u.userId;
});
@@ -1371,7 +1371,7 @@ MegolmDecryption.prototype.onRoomKeyEvent = function(event) {
if (event.getType() == "m.forwarded_room_key") {
exportFormat = true;
forwardingKeyChain = content.forwarding_curve25519_key_chain;
if (!utils.isArray(forwardingKeyChain)) {
if (!Array.isArray(forwardingKeyChain)) {
forwardingKeyChain = [];
}