docs-matrix-spec/locales/zh-Hans/rooms/fragments/v4-event-ids.md
2025-04-20 16:13:37 +08:00

10 lines
894 B
Markdown

---
---
{{< boxes/warning >}}
本页面的翻译未经核对,可能存在翻译质量不佳、错翻、漏翻等情况。您可以在 <a href="https://codeberg.org/wholetrans/docs-matrix-spec">Forgejo 存储库</a> 打开 Issue、提交 Pull Request 或<a href="mailto:errata@wholetrans.org">邮件联系</a>我们提出改进建议和参与翻译与核对。
{{< /boxes/warning >}}
{{% added-in v=4 %}} 事件 ID 是事件的[参考哈希](/server-server-api#calculating-the-reference-hash-for-an-event),其采用一种变体的[无填充 Base64 编码](/appendices#unpadded-base64),将第 62 和第 63 个字符分别替换为 `-``_`,而不是使用 `+``/`。这与 [RFC4648 URL 安全型 base64 的定义](https://tools.ietf.org/html/rfc4648#section-5)一致。
事件 ID 仍以前缀 `$` 开头,最终可能类似于 `$Rqnc-F-dvnEYJTyHq_iKxU2bZ1CI92-kuZq3a5lr5Zg`