fix(discord): do not split each line into individual messages (#573)

Closes #519

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **New Features**
  * Notification destinations can now be tested even when disabled, enabling configuration validation before activation

* **Improvements**
  * Discord notification formatting parameters optimized for enhanced message delivery

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Nico 2026-02-25 18:54:56 +01:00 committed by GitHub
parent b916df7736
commit 29967d7e4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 5 deletions

View file

@ -13,6 +13,8 @@ export const buildDiscordShoutrrrUrl = (config: Extract<NotificationConfig, { ty
let shoutrrrUrl = `discord://${webhookToken}@${webhookId}`;
const params = new URLSearchParams();
params.append("splitLines", "false");
if (config.username) {
params.append("username", config.username);
}

View file

@ -1,5 +1,5 @@
import { eq, and } from "drizzle-orm";
import { BadRequestError, ConflictError, InternalServerError, NotFoundError } from "http-errors-enhanced";
import { BadRequestError, InternalServerError, NotFoundError } from "http-errors-enhanced";
import { db } from "../../db/db";
import {
notificationDestinationsTable,
@ -229,10 +229,6 @@ const deleteDestination = async (id: number) => {
const testDestination = async (id: number) => {
const destination = await getDestination(id);
if (!destination.enabled) {
throw new ConflictError("Cannot test disabled notification destination");
}
const decryptedConfig = await decryptSensitiveFields(destination.config);
const shoutrrrUrl = buildShoutrrrUrl(decryptedConfig);