DEV: Adds new plugin API support to always show the topic map (#12642)

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.

diff --git a/app/assets/javascripts/discourse/app/lib/transform-post.js b/app/assets/javascripts/discourse/app/lib/transform-post.js
index 113a7a7..44dbe1d 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" &&

GitHub sha: 7e2b7bdd

This commit appears in #12642 which was approved by OsamaSayegh. It was merged by eviltrout.