mirror of
https://github.com/d0zingcat/alert-message-center.git
synced 2026-05-24 15:09:52 +00:00
feat: add group binding management
Signed-off-by: d0zingcat <iamtangli42@gmail.com>
This commit is contained in:
@@ -82,13 +82,15 @@ webhook.post("/:token/topic/:slug", async (c) => {
|
||||
})
|
||||
.filter((u): u is NonNullable<typeof u> => u !== null);
|
||||
|
||||
const groupRecipients: Recipient[] = topic.groupChats.map((g) => ({
|
||||
type: "group",
|
||||
id: g.id, // Binding ID
|
||||
name: g.name,
|
||||
feishuId: g.chatId,
|
||||
idType: "chat_id" as FeishuReceiveIdType,
|
||||
}));
|
||||
const groupRecipients: Recipient[] = topic.groupChats
|
||||
.filter((g) => g.status === "approved")
|
||||
.map((g) => ({
|
||||
type: "group",
|
||||
id: g.id, // Binding ID
|
||||
name: g.name,
|
||||
feishuId: g.chatId,
|
||||
idType: "chat_id" as FeishuReceiveIdType,
|
||||
}));
|
||||
|
||||
const allRecipients: Recipient[] = [...userRecipients, ...groupRecipients];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user