mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 02:41:13 +08:00
DEV: adds topic_url/topic_title placeholders (#28754)
`topic_tags_changed` trigger now fills the {{topic_url}} and {{topic_title}} placeholders. `topic_url` is the relative URL.
This commit is contained in:
@ -230,6 +230,10 @@ module DiscourseAutomation
|
||||
"topic" => topic,
|
||||
"removed_tags" => removed_tags,
|
||||
"added_tags" => added_tags,
|
||||
"placeholders" => {
|
||||
"topic_url" => topic.relative_url,
|
||||
"topic_title" => topic.title,
|
||||
},
|
||||
)
|
||||
end
|
||||
end
|
||||
|
@ -3,4 +3,7 @@
|
||||
DiscourseAutomation::Triggerable.add(DiscourseAutomation::Triggers::TOPIC_TAGS_CHANGED) do
|
||||
field :watching_categories, component: :categories
|
||||
field :watching_tags, component: :tags
|
||||
|
||||
placeholder :topic_url
|
||||
placeholder :topic_title
|
||||
end
|
||||
|
Reference in New Issue
Block a user