Skip to content

fix(quotes): prevent wrong quote length when moderator edits quote (@HmonWutt)#8274

Open
HmonWutt wants to merge 1 commit into
monkeytypegame:masterfrom
HmonWutt:fix-quotes-length
Open

fix(quotes): prevent wrong quote length when moderator edits quote (@HmonWutt)#8274
HmonWutt wants to merge 1 commit into
monkeytypegame:masterfrom
HmonWutt:fix-quotes-length

Conversation

@HmonWutt

Copy link
Copy Markdown
Contributor

Description

When a moderator edits a quote, the length of quote was calculated from the original (unedited) text instead of the new (edited) quote text.

Copilot AI review requested due to automatic review settings July 24, 2026 08:33
@monkeytypegeorge monkeytypegeorge added the backend Server stuff label Jul 24, 2026
@github-actions github-actions Bot added the waiting for review Pull requests that require a review before continuing label Jul 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes quote-approval flow so length is derived from the approved (possibly edited) quote text, matching what gets written to the quotes JSON.

Changes:

  • Compute approvedText once and reuse for text + length
  • Set quote.length from approvedText.length instead of the original targetQuote.text.length

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Server stuff waiting for review Pull requests that require a review before continuing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants