Discourse Username in Embedded Comments

Hi,

I’ve been trying to get the embedded Discourse comments to work with multiple users, via the discourseUserName field that’s part of embed.js.

The generated embedding URL seems to be correct (creating the discourse_username param), but I don’t think this is being passed correctly in the controller.

If I understand this correctly, then the following line triggers the job that will extract the content from the website:

https://github.com/discourse/discourse/blob/master/app/controllers/embed_controller.rb#L38

Notice that there is no mention of the discourse_username. However the RetrieveTopic job expects it to be passed as an argument named author_username:

https://github.com/discourse/discourse/blob/master/app/jobs/regular/retrieve_topic.rb#L16

Am I correct in this analysis? Has anybody ever had non-RSS-poll username embedding working?

Thanks for your help.

I have created a PR that addresses this:

https://github.com/discourse/discourse/pull/4040

sam

2 Likes