feat(server): PATCH /api/dm/:id — group name + icon update

This commit is contained in:
Jannis Braun
2026-05-10 18:23:48 +02:00
parent 096f12daf2
commit a06776fd86
3 changed files with 838 additions and 2 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ import { extractDomain } from './federation.js';
import path from 'path';
/** Validates that a URL is a safe asset URL (relative upload path, bare filename, or http/https) */
function isValidAssetUrl(url: string | null | undefined): boolean {
export function isValidAssetUrl(url: string | null | undefined): boolean {
if (!url || url.trim().length === 0) return true; // empty/null = clearing
const trimmed = url.trim();
if (trimmed.startsWith('/api/uploads/')) return true;