Read-Only Channels

Has anyone been able to figure out a workaround to making certain channel Read-Only (for everyone except authorised bots), in Mattermost Community version?

Hi shrey,

this is not possible with the community version out of the box unfortunately, every member of a channel is also allowed to write there. It would, in theory, be possible to accomplish that with a plugin that hooks in the event before a post is written to the channel and denies the request for everyone except for a specific set of user accounts.

How do i access/use the hook?

You can have a look at the code for the disable direct messaging plugin, which basically does the same, but for direct message channels. It could easily be adopted to suite your needs for public/private channels.

Is it also possible to set up something REST API based?

Call a webhook on the Read event?

I’m not familiar with Go.

No, sorry - such a functionality requires a plugin at the moment, since all the relevante pre-post and pre-store hooks are only available to plugins and not to API-based integrations.