From be80ef64a80384a8a056770a2f742aa2bcbedaa7 Mon Sep 17 00:00:00 2001 From: HmonWutt Date: Fri, 24 Jul 2026 10:24:34 +0200 Subject: [PATCH] fix(quotes): prevent wrong quote length when moderator edits quote --- backend/src/dal/new-quotes.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/src/dal/new-quotes.ts b/backend/src/dal/new-quotes.ts index 5741deb1b8cd..60c423836aa3 100644 --- a/backend/src/dal/new-quotes.ts +++ b/backend/src/dal/new-quotes.ts @@ -159,10 +159,12 @@ export async function approve( ); } const language = targetQuote.language; + + const approvedText = editQuote ?? targetQuote.text; const quote: ApproveQuote = { - text: editQuote ?? targetQuote.text, + text: approvedText, source: editSource ?? targetQuote.source, - length: targetQuote.text.length, + length: approvedText.length, approvedBy: name, id: -1, };