Revert "Revert "Fix showing peek preview while LL members are loading""
This commit is contained in:
parent
454d78254d
commit
f679acea08
7 changed files with 25 additions and 26 deletions
|
@ -480,7 +480,7 @@ function getMembershipCount(event, roomId) {
|
|||
sendError(event, _t('This room is not recognised.'));
|
||||
return;
|
||||
}
|
||||
const count = room.getJoinedMembers().length;
|
||||
const count = room.getJoinedMemberCount();
|
||||
sendResponse(event, count);
|
||||
}
|
||||
|
||||
|
@ -497,12 +497,11 @@ function canSendEvent(event, roomId) {
|
|||
sendError(event, _t('This room is not recognised.'));
|
||||
return;
|
||||
}
|
||||
const me = client.credentials.userId;
|
||||
const member = room.getMember(me);
|
||||
if (!member || member.membership !== "join") {
|
||||
if (room.getMyMembership() !== "join") {
|
||||
sendError(event, _t('You are not in this room.'));
|
||||
return;
|
||||
}
|
||||
const me = client.credentials.userId;
|
||||
|
||||
let canSend = false;
|
||||
if (isState) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue