mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
FEATURE: support for chronologically merging posts into existing topic (#21374)
When a user chooses to move a topic/message to an existing topic/message, they can now opt to merge the posts chronologically (using a checkbox in the UI).
This commit is contained in:
@ -820,6 +820,7 @@ class TopicsController < ApplicationController
|
||||
topic_id = params.require(:topic_id)
|
||||
destination_topic_id = params.require(:destination_topic_id)
|
||||
params.permit(:participants)
|
||||
params.permit(:chronological_order)
|
||||
params.permit(:archetype)
|
||||
|
||||
raise Discourse::InvalidAccess if params[:archetype] == "private_message" && !guardian.is_staff?
|
||||
@ -832,6 +833,7 @@ class TopicsController < ApplicationController
|
||||
|
||||
args = {}
|
||||
args[:destination_topic_id] = destination_topic_id.to_i
|
||||
args[:chronological_order] = params[:chronological_order] == "true"
|
||||
|
||||
if params[:archetype].present?
|
||||
args[:archetype] = params[:archetype]
|
||||
@ -849,6 +851,7 @@ class TopicsController < ApplicationController
|
||||
params.permit(:category_id)
|
||||
params.permit(:tags)
|
||||
params.permit(:participants)
|
||||
params.permit(:chronological_order)
|
||||
params.permit(:archetype)
|
||||
|
||||
raise Discourse::InvalidAccess if params[:archetype] == "private_message" && !guardian.is_staff?
|
||||
@ -1273,6 +1276,7 @@ class TopicsController < ApplicationController
|
||||
:destination_topic_id
|
||||
].present?
|
||||
args[:tags] = params[:tags] if params[:tags].present?
|
||||
args[:chronological_order] = params[:chronological_order] == "true"
|
||||
|
||||
if params[:archetype].present?
|
||||
args[:archetype] = params[:archetype]
|
||||
|
Reference in New Issue
Block a user