Slack like app - data model
We are trying to create a messaging system similar to Slack, Discord, etc. and we are looking for a bit of guidance.
We created a table called Channel on our side and whenever a user creates a new channel we also create Group on your side and attach users as members of this group. After that we are creating new threads using the Composer component providing groupId of the previously created group. To display it we use React hook thread.useThreads providing groupID as a filter.
To create threaded messages we send new messages using the Composer component providing threadId and groupId.
We would like to ask if you think that this structure is correct one or would you recommend some changes here?
Also, we would like to ask you for some guidance in terms of notifications. We would like to display a notification when there are some new replies in the channel (meaning new threads for the given group) but preferably we would like to have one notification per channel (to not spam the user), is it possible to do? Also, is it possible to mute notifications for specific channel (group)?
That structure is remarkably similar to how we built our own app that does this. We have a set of channels. Those map to groups for permissions. When you create a message in a channel, it specifies the groupID.
Let me tag @Josh who knows about notification aggregation. I don't think this is currently an option to aggregate that way, but it's a good idea.
Re: notification aggregation, what Dave says above is correct. Right now, notification aggregation is hardcoded around reactions -- we will aggregate multiple reactions on the same message into a single notification, but otherwise we don't aggregate. Definitely agree that it's a good idea to make this logic more general (and more generally useful) -- what you mention is a really good use-case for us to keep in mind. Unfortunately I don't think doing this will end up on the roadmap for quite a while.
Thanks for the reply 🙏 I have a small follow-up question regarding notifications. Currently, when someone is mentioned, they receive an email notification. Is it possible to mute it only for given channels/groups? If not, could you advise on how to disable these emails entriely?
Users can control their own notifications (or you can via the API). It is a per-user setting rather than per group though. You have a couple of options to control them. You can control them via the JS API on a user basis, or via the REST API on a user basis, or via the Console (or REST API) on an application basis.