DEV: Add import_embed_unlisted site setting (#26222)

This commit is contained in:
Angus McLeod
2024-03-27 13:57:43 +01:00
committed by GitHub
parent f79f9e236a
commit 7dc552c9cc
6 changed files with 69 additions and 23 deletions

View File

@@ -79,6 +79,7 @@ class TopicEmbed < ActiveRecord::Base
embed_url: url,
embed_content_sha1: content_sha1,
}
create_args[:visible] = false if SiteSetting.import_embed_unlisted?
post = PostCreator.create(user, create_args)
post.topic.topic_embed.update!(embed_content_cache: original_contents)