mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Pass discourse username to TopicRetriever from embed controller
When you specify `discourse_username` param on the embed URL, it should translate to creating the post with that username. This commit ensures that this is now the case.
This commit is contained in:
@@ -8,6 +8,7 @@ class EmbedController < ApplicationController
|
||||
|
||||
def comments
|
||||
embed_url = params[:embed_url]
|
||||
embed_username = params[:discourse_username]
|
||||
|
||||
topic_id = nil
|
||||
if embed_url.present?
|
||||
@@ -35,7 +36,7 @@ class EmbedController < ApplicationController
|
||||
end
|
||||
|
||||
elsif embed_url.present?
|
||||
Jobs.enqueue(:retrieve_topic, user_id: current_user.try(:id), embed_url: embed_url)
|
||||
Jobs.enqueue(:retrieve_topic, user_id: current_user.try(:id), embed_url: embed_url, author_username: embed_username)
|
||||
render 'loading'
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user