-
Notifications
You must be signed in to change notification settings - Fork 75
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
Align CommunityChats and Chats #14219
Comments
Closing as #11694 is the smarter avenue to tackle this issue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Follow up from #12595
Problem explained here: #14202 (comment)
The issue this refactor is trying to address is that from status-go, we have two types of Chats.
The
protocol.Chat
object is the basic Chat object we use mostly. it comes from the AllChats store and it is stored in our chatService's cache.The
CommunityChat
object is only used in Communities and comes as part of the Community description in thechats
property.The difference between the two is that
CommunityChat
contains less properties thanprotocol.Chat
, but, it also contains Community exclusive properties likecanPostReactions
and the community chat members, since the basic Chat only contains members for group chats.The problem in Desktop is that both those types of Chats are then converted into ChatDto, so when you're using Chats in the Desktop code, you can easily get confused and think you will have all the properties.
So the goal of the refactor is to align those two.
This is either by fixing the issue in status-go so that the AllChats store contains all the CommunityChat properties as well, so that we could just rely on our chatService cache.
This has the downside of maybe increase the load time on app start and the cache will be heavier on the status-go side. So we need to confirm with mobile if it's possible.
The other option is to make the chat service smarter and aggregate the CommunitChat data into its cache so that it stays up to date on the cCommunityChat data at all times, that way we only use that cache.
The downside of this second option is that it's more finicky and it also means mobile will run into the same problem
Let me know what you think and if you have other options.
The text was updated successfully, but these errors were encountered: