-
Notifications
You must be signed in to change notification settings - Fork 15
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
refactor: conversation message timer update event - WPB-10171 #2098
base: develop
Are you sure you want to change the base?
refactor: conversation message timer update event - WPB-10171 #2098
Conversation
@@ -59,25 +58,29 @@ public protocol ConversationLocalStoreProtocol { | |||
/// - Parameter isFederationEnabled: A flag indicating whether a `Federation` is enabled. | |||
|
|||
func storeConversation( | |||
_ conversation: WireAPI.Conversation, | |||
_ conversation: WireDomain.Conversation, |
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.
94b4ad4 introduces a WireDomain conversation object that replaces the WireAPI.Conversation object passed as parameter here to avoid introducing API layer elements in our local stores. (local stores should be agnostic of the API layer).
remoteConversation: WireAPI.Conversation, | ||
remoteConversationID: UUID, | ||
from conversation: Conversation, | ||
withID id: UUID, |
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.
many changes like this in this PR: renaming parameters for more clarity
@@ -173,7 +173,7 @@ public final class ConversationRepository: ConversationRepositoryProtocol { | |||
} | |||
|
|||
await conversationsLocalStore.storeConversation( | |||
conversation, | |||
conversation.toDomainModel(), |
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.
preparing data for the local store by converting the API object to a Domain object.
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.
looks good, can you ping me again on this one once other related PRs are merged (message system...)
Key points
This PR is part of the quick sync refactoring plan and is related to processing the multiple events we receive from the backend or the push channel.
Specifically, this PR is about porting the existing implementation of the
ConversationMessageTimerUpdate
event.Testing
UTs cover the following use cases, ensuring that
Checklist
[WPB-XXX]
.UI accessibility checklist
If your PR includes UI changes, please utilize this checklist: