0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 13:08:40 +08:00
discourse/plugins/discourse-topic-voting
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
..
app DEV: add upcoming change to enable topic voting badges by default (#41695) 2026-07-16 18:30:02 +04:00
assets FIX: Show the voting notification prompt when vote limits are disabled (#41731) 2026-07-15 14:54:37 +02:00
config I18N: Update translations (#41803) 2026-07-17 10:39:07 +02:00
db DEV: add upcoming change to enable topic voting badges by default (#41695) 2026-07-16 18:30:02 +04:00
lib/discourse_topic_voting FIX: Show the voting notification prompt when vote limits are disabled (#41731) 2026-07-15 14:54:37 +02:00
spec FIX: Correctly close fully merged topics containing whispers (#41800) 2026-07-17 11:07:29 +02:00
svg-icons FEATURE: restyle topic voting component, add voting to docked header (#39234) 2026-04-14 12:50:52 -04:00
test/javascripts FIX: Topic voting for nested replies topics (#40449) 2026-06-01 11:15:57 -05:00
package.json DEV: Add a script for generating external types in discourse-types (#37095) 2026-03-09 20:37:43 +01:00
plugin.rb DEV: add upcoming change to enable topic voting badges by default (#41695) 2026-07-16 18:30:02 +04:00
README.md
tsconfig.json DEV: Add a script for generating external types in discourse-types (#37095) 2026-03-09 20:37:43 +01:00

Discourse Topic Voting

Adds the ability for voting on a topic within a specified category.

Topic discussing the plugin itself can be found here: https://meta.discourse.org/t/discourse-voting/40121