0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-11 02:59:07 +08:00
discourse/app
Régis Hanol 6bb7b707ef
FIX: Correctly close fully merged topics containing whispers (#41800)
Previously, `PostMover` detected a full merge by comparing the sizes of
two differently-filtered post sets — a topic-wide census (`regular OR
(whisper AND action_code != 'split_topic')`, with no content filter and
a NULL-unsafe `!=`) against the movable set (which excludes
`small_action` and blank-`raw` posts). Any post the two filters
classified differently threw the counts off, so a topic that had ever
been assigned (its blank-`raw` tracking whisper is counted but never
movable) would never close on a full merge, was never scheduled for
deletion, and — via discourse-topic-voting, which only transfers votes
once the source topic closes — left its votes stranded. The same
asymmetry ran the other way for ordinary content whispers (dropped from
the census by the NULL comparison), so one left behind could wrongly
close and delete the source with its content still inside.

This change computes `@full_move` directly as "no close-preventing post
is left out of the move" — a set difference between the close-preventing
posts and the moved posts — using a single NULL-safe predicate
(`regular`/`whisper`, `raw <> ''`, `action_code IS DISTINCT FROM
'split_topic'`). Fully merged topics now reliably close and transfer
their votes, while a topic still holding whisper content correctly stays
open.
2026-07-17 11:07:29 +02:00
..
assets UX: add mobile horizontal swipe to see all emoji filters (#41772) 2026-07-17 10:04:11 +04:00
controllers FEATURE: Persist "Activity by category" dashboard filter selection (#41758) 2026-07-17 10:54:28 +03:00
helpers SECURITY: Bind shared session key to auth token and enforce user gates (#41610) 2026-07-14 13:25:05 +08:00
jobs FEATURE: Support users in DAccessControl and backend (#41358) 2026-07-15 09:18:06 +10:00
mailers FEATURE: Log in with a one-time email code (#40804) 2026-06-17 12:34:48 -07:00
models FIX: Correctly close fully merged topics containing whispers (#41800) 2026-07-17 11:07:29 +02:00
queries/reports DEV: Remove reporting_improvements upcoming change (#41259) 2026-07-01 07:52:02 +08:00
serializers FEATURE: Allow inviting new users directly as admins (#41748) 2026-07-16 14:59:24 -07:00
services FEATURE: Persist "Activity by category" dashboard filter selection (#41758) 2026-07-17 10:54:28 +03:00
views FIX: improve the reliability of chat sounds (#41373) 2026-07-02 18:52:41 -04:00