feat(telegram): add linkPreview config option
Add channels.telegram.linkPreview config to control whether link previews are shown in outbound messages. When set to false, uses Telegram's link_preview_options.is_disabled to suppress URL previews. - Add linkPreview to TelegramAccountConfig type - Add Zod schema validation for linkPreview - Pass link_preview_options to sendMessage in send.ts and bot/delivery.ts - Propagate linkPreview config through deliverReplies callers - Add tests for link preview behavior Fixes #1675 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
committed by
Peter Steinberger
parent
43a6c5b77f
commit
92ab3f22dc
@@ -118,6 +118,8 @@ export type TelegramAccountConfig = {
|
||||
reactionLevel?: "off" | "ack" | "minimal" | "extensive";
|
||||
/** Heartbeat visibility settings for this channel. */
|
||||
heartbeat?: ChannelHeartbeatVisibilityConfig;
|
||||
/** Controls whether link previews are shown in outbound messages. Default: true. */
|
||||
linkPreview?: boolean;
|
||||
};
|
||||
|
||||
export type TelegramTopicConfig = {
|
||||
|
||||
@@ -125,6 +125,7 @@ export const TelegramAccountSchemaBase = z
|
||||
reactionNotifications: z.enum(["off", "own", "all"]).optional(),
|
||||
reactionLevel: z.enum(["off", "ack", "minimal", "extensive"]).optional(),
|
||||
heartbeat: ChannelHeartbeatVisibilitySchema,
|
||||
linkPreview: z.boolean().optional(),
|
||||
})
|
||||
.strict();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user