Skip to content

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

Closed
wants to merge 5 commits into from
Closed

Conversation

muhsin-k
Copy link
Member

@muhsin-k muhsin-k commented Nov 27, 2024

The conversation slice manages conversations and messages.

@muhsin-k muhsin-k self-assigned this Nov 27, 2024
@muhsin-k muhsin-k requested a review from pranavrajs November 27, 2024 14:25
@muhsin-k muhsin-k marked this pull request as ready for review November 27, 2024 14:25
@muhsin-k muhsin-k changed the title feat: Add conversation store feat: Add conversation related store Nov 27, 2024
@muhsin-k muhsin-k changed the base branch from release/v4.0.0 to develop November 27, 2024 18:29
@muhsin-k muhsin-k changed the base branch from develop to release/v4.0.0 November 27, 2024 18:29
return;
}

const conversation = state.entities[conversationId];
Copy link
Member

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.

Comment on lines +101 to +106
const { conversationId, lastActivityAt } = action.payload;
const conversation = state.entities[conversationId];
if (!conversation) {
return;
}
conversation.lastActivityAt = lastActivityAt;
Copy link
Member

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.

@muhsin-k muhsin-k requested a review from scmmishra November 28, 2024 05:23
@muhsin-k muhsin-k changed the title feat: Add conversation related store feat: Add conversation store Nov 28, 2024
@muhsin-k muhsin-k changed the base branch from release/v4.0.0 to develop November 28, 2024 06:11
@muhsin-k muhsin-k changed the base branch from develop to release/v4.0.0 November 28, 2024 06:11
@muhsin-k
Copy link
Member Author

Some files are missing after the rebase. I will create separate PR.

@muhsin-k muhsin-k closed this Nov 28, 2024
@scmmishra
Copy link
Member

@muhsin-k let me know once the new PR is up

@muhsin-k muhsin-k deleted the feat/conversation-store branch November 29, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants