FEATURE: Fallback to system users when creating new TopicEmbed (#12386)
Previosly, if the topic embed request had a missing username parameter, and SiteSetting.embed_by_username was empty we would fail to create the new topic and not show any errors. Now we will fallback using the priority: 1. Username parameter 2. SiteSetting.embed_by_username 3. SiteSetting.site_contact_username 4. system user
This commit is contained in:
parent
0d3b7a3a82
commit
f8d9f09370
|
@ -41,7 +41,7 @@ class TopicRetriever
|
|||
|
||||
def fetch_http
|
||||
if @author_username.nil?
|
||||
username = SiteSetting.embed_by_username.downcase
|
||||
username = SiteSetting.embed_by_username.presence || SiteSetting.site_contact_username.presence || Discourse.system_user.username
|
||||
else
|
||||
username = @author_username
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue