Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var domainEvent = aliasEvent[domain];
var aliases = domainEvent.event.content.aliases;
if (aliases && aliases.indexOf(itemId) !== -1) {
room = knownRoom;
break;
}
}
if (room)break;
}
}
if (!room)
reject();
}
var avatarEvent = room.currentState.events['m.room.avatar'];
if (!avatarEvent) {
reject();
return;
}
var mxcUrl = avatarEvent[''].event.content.url;
if (mxcUrl) this._downloadMxcContent(mxcUrl).then(resolve, reject);
else reject();
} else if (itemId[0] == '@') {
var user = this._client.getUser(itemId);
if (!user.avatarUrl)
reject();
else this._downloadMxcContent(user.avatarUrl).then(resolve, reject);
} else reject();
});
}
var send_level = 0;
var state_level = 0;
var default_user_level = 0;
var user_levels = [];
var events_levels = [];
var current_user_level = 0;
var power_level_level = 0;
var can_change_levels = false;
}
var room_avatar_level = parseInt(power_levels.state_default || 0);
if (events_levels['m.room.avatar'] !== undefined) {
room_avatar_level = events_levels['m.room.avatar'];
}
var can_set_room_avatar = current_user_level >= room_avatar_level;
var change_avatar;
if (can_set_room_avatar) {
change_avatar = <div>
<h3>Room Icon</h3>
</div>;
}
var banned = this.props.room.getMembersWithMembership("ban");
return (
<div></div>
var state_level = 0;
var default_user_level = 0;
var user_levels = [];
var events_levels = [];
var current_user_level = 0;
var power_level_level = 0;
var can_change_levels = false;
}
var room_avatar_level = parseInt(power_levels.state_default || 0);
if (events_levels['m.room.avatar'] !== undefined) {
room_avatar_level = events_levels['m.room.avatar'];
}
var can_set_room_avatar = current_user_level >= room_avatar_level;
var change_avatar;
if (can_set_room_avatar) {
change_avatar = <div>
<h3>Room Icon</h3>
</div>;
}
var banned = this.props.room.getMembersWithMembership("ban");
return (
<div>
<textarea placeholder="Topic"> <br/></textarea></div>