diff --git a/config/site_settings.yml b/config/site_settings.yml index cf284b67d2..a690211616 100644 --- a/config/site_settings.yml +++ b/config/site_settings.yml @@ -939,7 +939,7 @@ posting: embed_any_origin: false embed_topics_list: false embed_set_canonical_url: false - embed_unlisted: false + embed_unlisted: true embed_truncate: true embed_support_markdown: false allowed_embed_selectors: "" diff --git a/spec/models/topic_embed_spec.rb b/spec/models/topic_embed_spec.rb index 48df6ce768..d3dc1567b1 100644 --- a/spec/models/topic_embed_spec.rb +++ b/spec/models/topic_embed_spec.rb @@ -41,7 +41,7 @@ describe TopicEmbed do expect(TopicEmbed.where(topic_id: post.topic_id)).to be_present expect(post.topic.category).to eq(embeddable_host.category) - expect(post.topic).to be_visible + expect(post.topic).not_to be_visible end it "Supports updating the post content" do @@ -88,6 +88,13 @@ describe TopicEmbed do pc.create expect(imported_post.topic.reload).to be_visible end + + it "won't be invisible if `embed_unlisted` is set to false" do + Jobs.run_immediately! + SiteSetting.embed_unlisted = false + imported_post = TopicEmbed.import(user, "http://eviltrout.com/abcd", title, "some random content") + expect(imported_post.topic).to be_visible + end end context "post creation supports markdown rendering" do