1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-07 10:46:24 +03:00

Revert "Fix showing peek preview while LL members are loading"

This commit is contained in:
David Baker
2018-08-22 16:16:17 +01:00
committed by GitHub
parent 6967bcb445
commit bf7633250a
7 changed files with 26 additions and 25 deletions

View File

@@ -480,7 +480,7 @@ function getMembershipCount(event, roomId) {
sendError(event, _t('This room is not recognised.'));
return;
}
const count = room.getJoinedMemberCount();
const count = room.getJoinedMembers().length;
sendResponse(event, count);
}
@@ -497,11 +497,12 @@ function canSendEvent(event, roomId) {
sendError(event, _t('This room is not recognised.'));
return;
}
if (room.getMyMembership() !== "join") {
const me = client.credentials.userId;
const member = room.getMember(me);
if (!member || member.membership !== "join") {
sendError(event, _t('You are not in this room.'));
return;
}
const me = client.credentials.userId;
let canSend = false;
if (isState) {