Skip to content

Commit

Permalink
Group Details: Show unregistered users in member list
Browse files Browse the repository at this point in the history
  • Loading branch information
scottnonnenberg-signal authored Jul 28, 2021
1 parent e7a2365 commit 4b92e12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions ts/test-both/util/getGroupMemberships_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('getGroupMemberships', () => {
assert.isEmpty(result);
});

it('filters out unregistered conversations', () => {
it('does not filter out unregistered conversations', () => {
const conversation = {
memberships: [
{
Expand All @@ -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', () => {
Expand Down
2 changes: 1 addition & 1 deletion ts/util/getGroupMemberships.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }];
Expand Down

0 comments on commit 4b92e12

Please sign in to comment.