# Secret Text Plugin

**URL:** <https://meta.discourse.org/t/secret-text-plugin/61615>\
**Category:** Development\
**Created:** [2017 年 4 月 26 日午前 2:58 UTC](https://meta.discourse.org/t/secret-text-plugin/61615 "2017-04-26T02:58:43Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![logannc](https://avatars.discourse-cdn.com/v4/letter/l/4da419/32.png) [@logannc](https://meta.discourse.org/u/logannc)\
**Post date:** [2017 年 4 月 26 日午前 2:58 UTC](https://meta.discourse.org/t/secret-text-plugin/61615/1 "2017-04-26T02:58:43Z")

</div>

I posted this in the Dev section because I do not think such a plugin exists. If I’m wrong, I would love to be corrected.

I would like to create a Discourse plugin that allows ‘secret’ text in the midst of a post. This would enable Play by Post RPG games where players interact privately without requiring an unwieldy number of threads.

The idea is that you can post with [secret=username1,username2]text[/secret] and it would only appear to the poster and those specified. For now, we will ignore overrides such as Admins / Thread starters, etc.

Is there documentation on the Discourse Rails app structure? Are there endpoints I can hook into, callbacks I can register, etc that make something like this easy? I’d rather not go digging through dozens of files to try to find the right place and learn Rails all at the same time, not if one of you kind folk can point me to the easy way.

I would naively expect that, at worst, I can override the default renderer for posts and filter out secret tags without the request user. Is there a way to register functionality like that (middleware)? Or do I need to go spelunking into the bowels of Discourse?

---

_[View the full topic](https://meta.discourse.org/t/secret-text-plugin/61615)._
