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
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 thechannels
table, and add auser
relationship to theChannel
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 therecipient
and the channel as thescope
. (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. (ThePermittedScope
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!
awesome, thanks for the detailed write-up. Totally get that it wouldn't be on the roadmap but good to know it's remotely possible!
Hey Toby - is there any update on this? I see that on the homepage it mentions "public and private discussion" as features. I didn't see any documentation about how the "private" side of that works though. Is there a place I should be looking? Thank you!!
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!
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.
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.
Right - if it's already on your roadmap, then we're happy to let you do the hard work! :) Thank you!