Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple channel lists with 100+ channel members #2019

Open
mishkeTz opened this issue Mar 20, 2023 · 3 comments
Open

Multiple channel lists with 100+ channel members #2019

mishkeTz opened this issue Mar 20, 2023 · 3 comments
Labels
Awaiting API Improvement Waiting for BE implementation Needs Triaging

Comments

@mishkeTz
Copy link

mishkeTz commented Mar 20, 2023

There was a new version that introduced support for the new prop channelRenderFilterFn that can be used to add the last step of filtering of channels that should be displayed in the list.

In my case, we have two channel lists that we display on two different screens, and in some cases the group from channel list B would end up in channel list A and vice versa.

Quote from another issue I created #1945

My question for this is because it seems that when there are multiple channel lists i.e. A and B, and when the user sends the message from the channel (list A) then the channel also appears in channel list B, and none of the events handles gets called but the channel just gets added.


To fix this issue I used channelRenderFilterFn to add filtering and check if the user is actually a member of that channel or not to have the correct list of channels that are displayed to the user. However, this doesn't work in cases when the group has over 100+ members, because we don't get the full list of members on the channel and the condition check will fail.

channelRenderFilterFn={(channels) => { return channels?.filter(({ state: { members = [] } = {} }) => Object.keys(members)?.includes(userId)); }}


The members limit of 100 also makes some other places or features that we want to have on the app difficult...

Is there a way to get the whole list of members or in this case another way to achieve this check?
This all comes to issues when there is an integration of two channel lists in the app...

@vanGalilea
Copy link
Contributor

Might be related to a stale state, we will have a look at it @mishkeTz thanks

@mishkeTz
Copy link
Author

mishkeTz commented Apr 5, 2023

Is there any update on this? Will there be a solution to this problem, we are experiencing problems where we have two channel lists with different filters, and due to this issue mentioned above where we have to use channelRenderFilterFn which doesn't work with our condition as we only get 100 channel members back.

@vanGalilea Any updates regarding this on your side? Did you prioritize this topic? Is there a way for me to implement a fix for this on my side?

@vishalnarkhede
Copy link
Contributor

@mishkeTz This is indeed a limitation of chat api at the moment.

Could you tell me more about the product requirements around multiple channel lists? What is channel list A and B? Or what are the filters exactly. Maybe I can suggest some alternative solution.

@vishalnarkhede vishalnarkhede added the Awaiting API Improvement Waiting for BE implementation label Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting API Improvement Waiting for BE implementation Needs Triaging
Projects
None yet
Development

No branches or pull requests

3 participants