mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
Merge pull request #1860 from ecuk/embed-category
Add site setting for category of topics created by embedding
This commit is contained in:
commit
8493f4ad27
3 changed files with 8 additions and 1 deletions
|
@ -19,7 +19,12 @@ class TopicEmbed < ActiveRecord::Base
|
|||
# If there is no embed, create a topic, post and the embed.
|
||||
if embed.blank?
|
||||
Topic.transaction do
|
||||
creator = PostCreator.new(user, title: title, raw: absolutize_urls(url, contents), skip_validations: true, cook_method: Post.cook_methods[:raw_html])
|
||||
creator = PostCreator.new(user,
|
||||
title: title,
|
||||
raw: absolutize_urls(url, contents),
|
||||
skip_validations: true,
|
||||
cook_method: Post.cook_methods[:raw_html],
|
||||
category: SiteSetting.embed_category)
|
||||
post = creator.create
|
||||
if post.present?
|
||||
TopicEmbed.create!(topic_id: post.topic_id,
|
||||
|
|
|
@ -794,6 +794,7 @@ en:
|
|||
feed_polling_enabled: "Whether to import a RSS/ATOM feed as posts"
|
||||
feed_polling_url: "URL of RSS/ATOM feed to import"
|
||||
embed_by_username: "Discourse username of the user who creates the topics"
|
||||
embed_category: "Category of created topics"
|
||||
embed_post_limit: "Maximum number of posts to embed"
|
||||
|
||||
notification_types:
|
||||
|
|
|
@ -356,6 +356,7 @@ embedding:
|
|||
feed_polling_enabled: false
|
||||
feed_polling_url: ''
|
||||
embed_by_username: ''
|
||||
embed_category: ''
|
||||
embed_post_limit: 100
|
||||
|
||||
uncategorized:
|
||||
|
|
Loading…
Reference in a new issue