fix(ai-moderation): fallback to discord_url when uploaded_url is null for attachment images

This commit is contained in:
MythEclipse
2026-06-04 17:06:57 +07:00
parent fc52fe5c1d
commit aaebe168cf
@@ -1248,7 +1248,7 @@ async function _runSingleMediaAnalysis(
const mediaAnalysisMap = new Map<string, string[]>(); const mediaAnalysisMap = new Map<string, string[]>();
const getAttachmentImageUrl = (att: AttachmentRecord): string | null => const getAttachmentImageUrl = (att: AttachmentRecord): string | null =>
att.uploaded_url ?? null; att.uploaded_url ?? att.discord_url ?? null;
const maxDimension = config.AI_LLM_IMAGE_MAX_DIMENSION ?? 1024; const maxDimension = config.AI_LLM_IMAGE_MAX_DIMENSION ?? 1024;
const content = getAnalysisContent(target); const content = getAnalysisContent(target);