Group Details: Show unregistered users in member list
This commit is contained in:
parent
e7a2365905
commit
4b92e12f83
2 changed files with 7 additions and 3 deletions
|
@ -57,7 +57,7 @@ describe('getGroupMemberships', () => {
|
|||
assert.isEmpty(result);
|
||||
});
|
||||
|
||||
it('filters out unregistered conversations', () => {
|
||||
it('does not filter out unregistered conversations', () => {
|
||||
const conversation = {
|
||||
memberships: [
|
||||
{
|
||||
|
@ -70,7 +70,11 @@ describe('getGroupMemberships', () => {
|
|||
const result = getGroupMemberships(conversation, getConversationById)
|
||||
.memberships;
|
||||
|
||||
assert.isEmpty(result);
|
||||
assert.lengthOf(result, 1);
|
||||
assert.deepEqual(result[0], {
|
||||
isAdmin: true,
|
||||
member: unregisteredConversation,
|
||||
});
|
||||
});
|
||||
|
||||
it('hydrates memberships', () => {
|
||||
|
|
|
@ -29,7 +29,7 @@ export const getGroupMemberships = (
|
|||
memberships: memberships.reduce(
|
||||
(result: Array<GroupV2Membership>, membership) => {
|
||||
const member = getConversationById(membership.conversationId);
|
||||
if (!member || isConversationUnregistered(member)) {
|
||||
if (!member) {
|
||||
return result;
|
||||
}
|
||||
return [...result, { isAdmin: membership.isAdmin, member }];
|
||||
|
|
Loading…
Reference in a new issue