🔧 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.

⁨7⁩ ⁨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!

Toby Toby Waterhole Founder Apr 1, 2024
In reply to G Greg Garrison

Hey @Greg Garrison, "private discussion" on the homepage is referring to the ability to set up user groups and permissions for different parts of the community. Let me know if you have any questions about how it works!

In reply to Toby Toby

Ahh - gotcha. Great. We'll definitely take advantage of that.

I think at some point we're also going to want something like a private inbox for individual, one-to-one messaging. Is anything like that already on the roadmap? I thought your brainstorming above was super helpful and I'd love to get any insight/reaction from the guy who created the package. :)

Off the top of your head, would you re-use channels (adding 2 nullable user_id columns for to and from maybe?) or create a new table for "messages"? There'd also be probably 2 or 3 new route/controller/view just related to an "inbox" and creating messages. Do you see any likely pitfalls?

Thanks, Toby.

Toby Toby Waterhole Founder Apr 2, 2024
In reply to G Greg Garrison

Ah I see - private messaging is definitely on the roadmap as a core feature! Likely in one of the next few 0.x releases. The brainstorming in this topic is more for private channels (which are not on the roadmap) rather than private messages. The messaging feature will be separate from channels.