diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 3dac97899..60a1c171c 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -51,7 +51,8 @@ class MessagesController < ApplicationController def reply return normal_status(2, "回复内容不能为空") if params[:content].blank? - @reply = Message.create!(board: @message.board, root: @message.root, author: current_user, parent: @message, + @reply = Message.create!(board: @message.board, root_id: @message.root_id || @message.id, + author: current_user, parent: @message, message_detail_attributes: { content: params[:content] })