Custom message routing
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 30/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- openapi, typescript
调研方向
该 issue 未指定任何文件、测试或入口点。首先检查仓库的 TypeScript typings 和 OpenAPI v3 generator,然后明确自定义路由及其权限、不可变性和删除规则如何与 API 适配。完成的标准是:路由模型和生命周期行为已完成规范定义,并通过验证和测试覆盖实现。
由索引模型根据 Issue 内容生成。
描述
What do you want to see?
This could be useful for cross-posting and IoT-related use cases. Custom route management should be permissions-gated to prevent spamming by randomly creating message routes.
The semantics should be as follows: server-wide permissions allow you to create, alter and drop a message route targeting any channel, while per-guild permission only allows you to do so while requiring you to have either:
- Posting, storage, view all within that guild
- Posting channel is null (meaning that route is read-only) and view channel is within that guild, no constraints on storage channel
Routing rule
A routing rule shall consist of eight elements:
- Timestamp of the registration (stored as snowflake)
- Source channel
- Storage channel
- Sink channel
- Source users (user, group or role ID)
- Target users (user, group or role ID)
- Valid since timestamp
- Valid until timestamp
Invariants
- Valid since cannot be earlier than time of registration
- Valid until cannot be earlier than valid since
- Source user set has to have message posting permission in the source channel at the time of use
- Event type validity checks are done based on the storage channel
- Target user set has to have read messages permission in the source channel at the time of use
- Each routing rule is considered immutable once created, except for valid until timestamp, which can be set to any future time while the routing rule is still in effect
A routing rule can only be deleted in either of the following cases:
- none of the source channels are present
- none of the storage channels are present
- none of the sink channels are present
- the routing rule is not in effect AND no messages are affected by deletion of the routing rule
- 主要语言
- TypeScript
- 星标
- 42
- 派生
- 34
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
stoatchat/javascript-client-api 的其他 Issue
-
bug
难度 4/5 3-5 天 新手友好度 35/100
stoatchat/javascript-client-api#34 · 1 条评论 ·
-
enhancement
难度 4/5 3-5 天 新手友好度 35/100
stoatchat/javascript-client-api#29 · 1 个 reaction ·
-
feature request: Make GET channels/{target}/messages use request body instead of query parameters 未关闭enhancement
难度 5/5 一周以上 新手友好度 35/100
stoatchat/javascript-client-api#28 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 35/100
stoatchat/javascript-client-api#18 · 2 条评论 · 4 个 reaction ·
-
enhancement
难度 5/5 一周以上 新手友好度 25/100
stoatchat/javascript-client-api#16 · 2 条评论 · 8 个 reaction ·
查看 stoatchat/javascript-client-api 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
area:tools bug good first issue help wanted priority:P2
难度 2/5 1-3 小时 新手友好度 90/100
TaewoooPark/Motifcode#14 ·
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
newrelic-experimental/preflight#793 · 1 条评论 ·
-
bug 🐞
难度 2/5 1-3 小时 新手友好度 68/100
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
BasedHardware/omi#15320 ·