From 7e2b7bdd78628cc6367f40b83ff902cedf5c9a6c Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 8 Apr 2021 08:19:25 -0400 Subject: [PATCH] DEV: Adds new plugin API support to always show the topic map (#12642) You can enable this by using the `includePostAttributes` API call with the value of `topicMap`. This will always show the topic map at the top of a topic regardless of how many posts there are. --- app/assets/javascripts/discourse/app/lib/transform-post.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/javascripts/discourse/app/lib/transform-post.js b/app/assets/javascripts/discourse/app/lib/transform-post.js index 113a7a766a..44dbe1d5cd 100644 --- a/app/assets/javascripts/discourse/app/lib/transform-post.js +++ b/app/assets/javascripts/discourse/app/lib/transform-post.js @@ -172,6 +172,7 @@ export default function transformPost( } const showTopicMap = + _additionalAttributes.indexOf("topicMap") !== -1 || showPMMap || (post.post_number === 1 && topic.archetype === "regular" &&