matrix-org / matrix-org/matrix-js-sdk

summaryInvitedMemberCount is unreliable

Open
#2,133 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

T-Defect
Dominant language
TypeScript
Stars
2.2k
Forks
704
Avg merge
1d 20h
Merged PRs (30d)
40

Description

**Describe the bug**
This seems to cause `summaryInvitedMemberCount` to incorrectly be 1 which causes getInvitedMemberCount() in turn to be 1, despite the fact that the room state has two members, both of which are joined. The summary counts seem to not get reset in some circumstances.

This originally manifested as https://github.com/vector-im/element-web/issues/20753 but I'm filing a separate bug as I'll revert the change that caused it.

**To Reproduce**
Steps to reproduce the behavior:
On Element-web / desktop:
1. On user A, start chat with user B
2. Accept on user B's client
3. Immediately refresh on User A's client

**Expected behavior**
`summaryInvitedMemberCount` should be 0 for the room (two users, both joined).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing summaryInvitedMemberCount and getInvitedMemberCount() through the room-state membership handling in the TypeScript SDK, using the Element-web reproduction steps as the scenario. Confirm the refresh sequence where two joined members still produce an invited count of 1, then ensure the summary reports 0 for that room.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.