Skip to content

Commit

Permalink
getMembersCount: Return undefined when conversation has no members
Browse files Browse the repository at this point in the history
  • Loading branch information
scottnonnenberg-signal committed Feb 10, 2021
1 parent a8d7d71 commit 2957735
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ts/models/conversations.ts
Expand Up @@ -1412,9 +1412,9 @@ export class ConversationModel extends window.Backbone.Model<
window.Signal.Data.updateConversation(this.attributes);
}

getMembersCount(): number {
getMembersCount(): number | undefined {
if (this.isPrivate()) {
return 1;
return undefined;
}

const memberList = this.get('membersV2') || this.get('members');
Expand All @@ -1429,7 +1429,7 @@ export class ConversationModel extends window.Backbone.Model<
return temporaryMemberCount;
}

return 0;
return undefined;
}

decrementMessageCount(): void {
Expand Down

0 comments on commit 2957735

Please sign in to comment.