feat: handling delete conversation#50
Open
danhmaisgt wants to merge 8 commits intofeat/fc-18-leave-conversationfrom
Open
feat: handling delete conversation#50danhmaisgt wants to merge 8 commits intofeat/fc-18-leave-conversationfrom
danhmaisgt wants to merge 8 commits intofeat/fc-18-leave-conversationfrom
Conversation
24e6fa4 to
fa9ccdf
Compare
Base automatically changed from
feature/adding_setting_prefix_for_firestore
to
master
July 23, 2024 06:28
honghoangsts
requested changes
Jul 24, 2024
| }); | ||
|
|
||
| /** Delete all messages of the conversation */ | ||
| const messageBatch = firestore().batch(); |
Collaborator
There was a problem hiding this comment.
Why we need delete all message?
huydosgtech
reviewed
Aug 7, 2024
| ...state, | ||
| listConversation: newListConversation, | ||
| }; | ||
| case ChatActionKind.DELETE_CONVERSATION: |
Contributor
There was a problem hiding this comment.
I think this related to listConversation, so we should rename action more meaning like as UPDATE_LIST_CONVERSATION
Contributor
Author
There was a problem hiding this comment.
I think this name is ok, if you want it to be clearer, how about DELETE_CONVERSATION_IN_LIST?
huydosgtech
reviewed
Aug 7, 2024
| await userConversation.delete(); | ||
| if (!forAllMembers) return true; | ||
|
|
||
| /** Delete latest message of that conversation for all other partners */ |
Contributor
There was a problem hiding this comment.
Should we split the function even smaller?
c87b7f9 to
c95adaa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Usage: