matrix-org / matrix-org/matrix-python-sdk
Room aliases list doesn't take into account multiple m.room.aliases states
- Dominant language
- Python
- Stars
- 266
- Forks
- 118
- PR merge metrics
- No merged PRs in 30d
Description
The [Room.update_aliases](https://github.com/matrix-org/matrix-python-sdk/blob/master/matrix_client/room.py#L416) method does not take into account that there can be multiple `m.room.aliases` states. Because room aliases from separate HSes are in separate `m.room.aliases` states (with the HS name as the state key), this means the `update_aliases` function will actually set the aliases list to only contain the aliases from one HS, disregarding the others.
Example (the code should list all aliases for Matrix HQ):
```
>>> client.rooms['!cURbafjkfsMDVwdRDQ:matrix.org'].update_aliases()
True
>>> client.rooms['!cURbafjkfsMDVwdRDQ:matrix.org'].aliases
['#matrix:utzutzutz.net']
```
Contributor guide
Research direction
Start in matrix_client/room.py at Room.update_aliases, then reproduce the example for the Matrix HQ room. Check how each m.room.aliases state is handled and verify that the resulting aliases list includes aliases from every homeserver state, not just one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100