mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 11:44:49 +08:00
Embedded topics are now unlisted by default
Previously this site setting `embed unlisted` defaulted to false and empty topics would be generated for embed, but those topics tend to take up a lot of room on the topic lists. This new default creates invisible topics by default until they receive their first reply.
This commit is contained in:
parent
070fe7f45d
commit
80a5482f28
|
@ -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: ""
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user