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?