-
Notifications
You must be signed in to change notification settings - Fork 345
feat: Add conversation store #849
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
Conversation
…/chatwoot-mobile-app into feat/conversation-store
return; | ||
} | ||
|
||
const conversation = state.entities[conversationId]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a mistake we made in the dashboard. Let us try to avoid it here. Move the messages to a message store
{ messageId: messageObject } format. To get the messages in order, we could get all message by conversationId. Adding a new message or updating message becomes easier this way.
const { conversationId, lastActivityAt } = action.payload; | ||
const conversation = state.entities[conversationId]; | ||
if (!conversation) { | ||
return; | ||
} | ||
conversation.lastActivityAt = lastActivityAt; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it a separate action, why don't we use the updateConversation option.
…/chatwoot-mobile-app into feat/conversation-store
Some files are missing after the rebase. I will create separate PR. |
@muhsin-k let me know once the new PR is up |
The conversation slice manages conversations and messages.