mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FIX: Duplicate link shouldn't happen on edit
This commit is contained in:
@ -8,7 +8,7 @@ class ComposerMessagesController < ApplicationController
|
||||
finder = ComposerMessagesFinder.new(current_user, params.slice(:composer_action, :topic_id, :post_id))
|
||||
json = { composer_messages: [finder.find].compact }
|
||||
|
||||
if params[:composer_action] == "reply" && params[:topic_id].present?
|
||||
if params[:topic_id].present?
|
||||
topic = Topic.where(id: params[:topic_id]).first
|
||||
if guardian.can_see?(topic)
|
||||
json[:extras] = {duplicate_lookup: TopicLink.duplicate_lookup(topic)}
|
||||
|
Reference in New Issue
Block a user