diff --git a/extensions/synology-chat/src/client.ts b/extensions/synology-chat/src/client.ts index d66f1b720f4..edf840a88cf 100644 --- a/extensions/synology-chat/src/client.ts +++ b/extensions/synology-chat/src/client.ts @@ -49,7 +49,7 @@ export async function sendMessage( incomingUrl: string, text: string, userId?: string | number, - allowInsecureSsl = true, + allowInsecureSsl = false, ): Promise { // Synology Chat API requires user_ids (numeric) to specify the recipient // The @mention is optional but user_ids is mandatory @@ -90,7 +90,7 @@ export async function sendFileUrl( incomingUrl: string, fileUrl: string, userId?: string | number, - allowInsecureSsl = true, + allowInsecureSsl = false, ): Promise { const body = buildWebhookBody({ file_url: fileUrl }, userId); @@ -112,7 +112,7 @@ export async function sendFileUrl( */ export async function fetchChatUsers( incomingUrl: string, - allowInsecureSsl = true, + allowInsecureSsl = false, log?: { warn: (...args: unknown[]) => void }, ): Promise { const now = Date.now(); @@ -187,7 +187,7 @@ export async function fetchChatUsers( export async function resolveChatUserId( incomingUrl: string, webhookUsername: string, - allowInsecureSsl = true, + allowInsecureSsl = false, log?: { warn: (...args: unknown[]) => void }, ): Promise { const users = await fetchChatUsers(incomingUrl, allowInsecureSsl, log); @@ -220,7 +220,7 @@ function parseNumericUserId(userId?: string | number): number | undefined { return Number.isNaN(numericId) ? undefined : numericId; } -function doPost(url: string, body: string, allowInsecureSsl = true): Promise { +function doPost(url: string, body: string, allowInsecureSsl = false): Promise { return new Promise((resolve, reject) => { let parsedUrl: URL; try {