mirror of
https://github.com/ReCloudStudio/WebHooker.git
synced 2026-09-22 16:11:29 +00:00
fix(invites): list invites via per-group KV index instead of kv.list
Cloudflare KV's list operation is eventually consistent and can lag
behind a fresh write, so pending invites were invisible right after
creation (GET /admin/api/groups/:id/invites returned {invites: []}).
Keep a per-group token index (invite:group:{id}) updated on create,
revoke, accept and expiry; the members panel also inserts the freshly
created invite into the list immediately and copies the absolute link.
This commit is contained in:
parent
ce9f6147f1
commit
a0e15975df
4 changed files with 76 additions and 8 deletions
|
|
@ -262,6 +262,7 @@ owner(及超级管理员)可在分组的「成员」面板创建一次性邀
|
|||
| `token-reverse:{sha256}` | 用于按 Token 反查的用户 id | 0.9 × Token 有效期 |
|
||||
| `state:{hex}` | `{ redirectTo, expiresAt, discordUserId?, telegramUserId?, telegramChatId? }` | 600 秒 |
|
||||
| `invite:{token}` | `{ groupId, role, expiresAt, createdBy, note? }` | 7 天 |
|
||||
| `invite:group:{id}` | 每组的 Token 索引(保证邀请列表一致性) | 永久 |
|
||||
| `delivery:{id}` | Webhook 投递 id(去重标记) | 300 秒 |
|
||||
| `msg:{routeId}:{key}:{target}` | 原地更新用消息 id 追踪(如 `workflow_run`) | 7 天 |
|
||||
| `cmd:guild:{id}` | 已注册命令的服务器 id(去重标记) | 永久 |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue