feat: 项目负责人+内部任务群+portal 内部身份领取+群主链接归属
- 迁移 0012:projects.owner_userid / tasks.task_chat_id / claims.owner_partner_id - lib/task-group-service.ts:懒建 appchat 任务群(首个内部群主领取时创建,成员 diff 补员),播报/卡片文案 - wecom-client 新增 appchat create/update/get/send 封装 - OAuth ticket 增可选 uid(v:1 兼容),内部成员领取按 wecom_userid 解析群主身份 - 外部 OAuth 领取人 upsert 打 partner_type='group_owner' - portal 链接带 ?owner= 穿透 OAuth 往返,claims 记录归属群主 - 后台任务卡「群主链接」面板:复制链接/推送内部群主/任务群状态 - 催办与超期升级同步播报进任务群
This commit is contained in:
@@ -45,9 +45,19 @@ async function handlePost(request: Request) {
|
||||
expiresIn,
|
||||
});
|
||||
}
|
||||
const userId = identity.userId ?? "";
|
||||
if (!userId) {
|
||||
return Response.json({ error: "企业微信未返回有效身份" }, { status: 400 });
|
||||
}
|
||||
const { ticket, expiresIn } = await signWecomIdentityTicket("", "", {
|
||||
userId,
|
||||
});
|
||||
return Response.json({
|
||||
userType: "internal",
|
||||
userId: identity.userId ?? "",
|
||||
userId,
|
||||
identityTicket: ticket,
|
||||
displayName: userId,
|
||||
expiresIn,
|
||||
});
|
||||
} catch (error) {
|
||||
const status = error instanceof WecomClientError ? error.status : 500;
|
||||
|
||||
Reference in New Issue
Block a user