Filter by multiple group IDs
Hey team,
We are building a messaging system and we use thread.useThreadCounts API to get unread count both by providing groupID to get count for a given channel and without specifying it to get it for all the channels.
The problem is that daily we are removing all the channels in our database but users stay. So we end up with some "ghost" unreads that we cannot see anymore in the app.
To resolve this issue we would like to provide to filters an array of group IDs to show it only for channels that we currently have in the database.
Do you think it would be possible to support it?
Can you explain a little more what a channel is? Is each channel tied 1:1 to a group? Is deleting a channel then deleting a group? If you delete a group, we will delete all threads/messages associated with it.
When you say "ghost" unreads, do you mean notifications that refer to threads/messages that were deleted? If so, we probably need to clean these up when deleting, like we do threads + messages.
I don't really understand how a filter with an array of group IDs solves the problem for you. But I think that is largely me not fully understanding the data model.
It is very reasonable though to consider accepting an array of groupIDs rather than just a single one in the filter.
Sorry, maybe I wasn't precise enough either. We have in our database entity called Channel that is 1:1 linked to Cord's group. The problem is that we remove only our database entities (when restoring staging backup) but Cord groups are staying and you have some ghost groups/messages that you cannot see.
A workaround would be probably removing all groups as well but it's bit more tricky on our side 😅 That's why I thought about supporting array of group IDs