matrix-org / matrix-org/matrix-python-sdk

Room aliases list doesn't take into account multiple m.room.aliases states

未关闭
#106 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug Client layer good first issue
主要语言
Python
星标
266
派生
118
PR 合并指标
30 天内没有已合并 PR

描述

The Room.update_aliases 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']

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 matrix_client/room.py 中的 Room.update_aliases 开始,然后复现 Matrix HQ room 的示例。检查每个 m.room.aliases 状态是如何处理的,并验证生成的 aliases 列表包含来自每个 homeserver 状态的 aliases,而不只是来自其中一个。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
api
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
描述清楚
新手友好度
38/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。