feat: add slack replyToModeByChatType overrides

This commit is contained in:
Peter Steinberger
2026-01-23 05:24:18 +00:00
parent eebd750781
commit 9bf295da48
7 changed files with 111 additions and 58 deletions

View File

@@ -248,6 +248,7 @@ export const SlackDmSchema = z
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
groupEnabled: z.boolean().optional(),
groupChannels: z.array(z.union([z.string(), z.number()])).optional(),
replyToMode: ReplyToModeSchema.optional(),
})
.strict()
.superRefine((value, ctx) => {
@@ -280,6 +281,14 @@ export const SlackThreadSchema = z
})
.strict();
const SlackReplyToModeByChatTypeSchema = z
.object({
direct: ReplyToModeSchema.optional(),
group: ReplyToModeSchema.optional(),
channel: ReplyToModeSchema.optional(),
})
.strict();
export const SlackAccountSchema = z
.object({
name: z.string().optional(),
@@ -307,6 +316,7 @@ export const SlackAccountSchema = z
reactionNotifications: z.enum(["off", "own", "all", "allowlist"]).optional(),
reactionAllowlist: z.array(z.union([z.string(), z.number()])).optional(),
replyToMode: ReplyToModeSchema.optional(),
replyToModeByChatType: SlackReplyToModeByChatTypeSchema.optional(),
thread: SlackThreadSchema.optional(),
actions: z
.object({