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

MatrixClient stores HS when logging in / registering, but not when creating with token

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

还没有人认领这个 Issue。

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

描述

When a client instance logs in / registers, the response contains, among other things, a home_server field. Currently, this information is stored as a .hs member of the instance. However, if the MatrixClient is created with an exiting token, no such registration/login takes plave, hence no response is received, and the instance doesn't set this member -- which means that code can't rely on its being there.

At the moment, this information isn't used anywhere in the code, so probably the best thing to do is to just remove it.

贡献指南

打开贡献指南

从这里开始

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

调研方向

首先定位 MatrixClient 类及其登录、注册和基于令牌的初始化路径。搜索 .hs 成员,并确认它未被使用,然后再移除不一致的存储;运行现有测试套件,以验证客户端创建和身份验证行为仍然正常。

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

评估

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

把新 issue 发到你的邮箱

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