Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

De-emphasise and reduce the usage of `/_synapse` endpoints

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

维护者通常 14 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
go

调研方向

首先检查 README.md 中的 Image Requirements、RegisterUser、TestCanRegisterAdmin、TestServerNotices 和 TestRegistration,以梳理当前所有 /_synapse 的使用情况。该提案没有定义替代 API,因此在 server-notice 接口和迁移范围达成一致之前,这项工作还未准备就绪;完成的标准是移除不必要的 Synapse 特定假设,同时保留 server-notice 覆盖范围。

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

描述

This is something I noticed while working on conduit support (#513), where it seems that complement currently requires or emphasizes the usage of /_synapse endpoints.

Specifically, it uses them like so:

  • Under "Image Requirements" in README.md, it asks for /_synapse/admin/v1/register to be supported for "admin" registrations.
    • This is then used in RegisterUser where isAdmin is true, which is used by the following tests:
      • TestCanRegisterAdmin
      • TestServerNotices
  • TestRegistration, under some t.Runs

From a puritan perspective, these should not exist within complement, as they test Synapse-specific behaviour that other servers have to then copy uncritically, and without blessing or formalisation from the spec.

From such a perspective, the concept of "admins" is also dubious, as the spec (explicitly) makes no serious note of them, leaving server administration as an implementation detail. (See MSC3593 for some context reading on an attempt to broach/formalise this as well.)


For all of complement's current usage of this endpoint, there is one problem with a suggestion of removing all of them altogether; Server Notices are defined in the spec, and so the absence of a formal mechanism which empowers servers/users to send server notices is unfortunate, but this means complement has no "closed system" way of implementing this.

To make the rejection of a /_synapse specific API explicit, and to develop a better way of testing server notices, I'm suggesting to introduce a /_complement API space, which servers should enable only in their corresponding complement images, and (for now) be only used for sending server notices (exact API forthcoming), not to elevate individual users as a "server admin", as this concept does not properly exist from a matrix specification standpoint.

This API space should only perform individual elevated actions, such as sending a single server notice via a POST API.

Hopefully, this way, we can avoid biasing to a certain implementation, and help make complement more pure or agnostic when testing conformity.

主要语言
Go
星标
101
派生
72
平均合并
11 天 5 小时
30 天内合并 PR
7

环境准备

从这里开始

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

matrix-org/complement 的其他 Issue

查看 matrix-org/complement 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

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