🔧 Development
B bradders Dec 15, 2023

Private/Invite-Only Channels?

Hi, just stumbled on waterhole, it looks awesome, great work.

Just kicking the tires a little bit, and wondering if the following is planned on the road map, or possible through customization:

Allowing a user to add a channel that's only visible to them and anyone they invite?

I see it's possible to create groups and use those to gate channels somewhat, but I was hoping to allow certain users to create their own channels and have those stay invisible to anyone not specifically invited.

⁨2⁩ ⁨Comments⁩

Answer
Toby Toby Waterhole Founder Dec 15, 2023

Welcome @bradders, thank you!

This is not possible out of the box, nor is it on the roadmap, but I think it could be done with some moderate customization leveraging standard Laravel conventions and hooking into Waterhole's permissions system. Off the top of my head, you might:

  • Create a migration to add a nullable user_id column to the channels table, and add a user relationship to the Channel model, so a channel can be "owned" by a user. (Relevant docs: Database)

  • Create a new route + controller + view with a form for users to "create a channel". When submitted, this would create a new Channel model belonging to the authenticated user. (Relevant docs: Routes, Frontend)

  • Add UI that allows users to invite other users to their channel. This could be done by adding a record to Waterhole's permissions table, setting the user as the recipient and the channel as the scope. (Relevant docs: Authorization, Frontend)

  • By default, admins can view everything. If you don't want user-created channels to be visible to uninvited admins, you might need to add a global scope to the Channel model which adds this condition. (The PermittedScope class might give an idea of what this could look like.)

I'm sure there would be a lot of other details to sort out, but hopefully this is a useful overview. Happy to help with any other questions!