matrix-org / matrix-org/matrix-js-sdk
summaryInvitedMemberCount is unreliable
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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