-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat(offline-backends): users and conversations without metadata refetch pt1. (AR-3123) #1736
feat(offline-backends): users and conversations without metadata refetch pt1. (AR-3123) #1736
Conversation
…ederation-usersmetadata
…n-usersmetadata-refetch
…tion-usersmetadata-refetch
Codecov Report
@@ Coverage Diff @@
## feat/epic-federation-offline-messages #1736 +/- ##
===========================================================================
+ Coverage 53.44% 53.68% +0.23%
+ Complexity 1494 1492 -2
===========================================================================
Files 931 924 -7
Lines 34501 34509 +8
Branches 3039 3032 -7
===========================================================================
+ Hits 18439 18526 +87
+ Misses 14840 14759 -81
- Partials 1222 1224 +2 |
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.
Great work! I just have one tiny comment about function naming :)
@@ -347,6 +349,24 @@ internal class ConversationMapperImpl( | |||
) | |||
} | |||
|
|||
override fun fromFailedConversationToEntity(conversationId: NetworkQualifiedId): ConversationEntity = ConversationEntity( |
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.
as we are hardcoding the conversation type to group maybe we can rename the function name to fromFailedGroupConversationToEntity
just so its a bit more clear whats the goal?
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.
Sorry, missed this PR and only commented on part 2.
I think we should consider adding field like hasIncompleteMetadata = true
in this case. This way we don't need to rely on a heuristic like name being null to figure out that conversation needs to be re-fetched.
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.
Thanks for the suggestions, done !
@@ -347,6 +349,24 @@ internal class ConversationMapperImpl( | |||
) | |||
} | |||
|
|||
override fun fromFailedConversationToEntity(conversationId: NetworkQualifiedId): ConversationEntity = ConversationEntity( |
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.
Sorry, missed this PR and only commented on part 2.
I think we should consider adding field like hasIncompleteMetadata = true
in this case. This way we don't need to rely on a heuristic like name being null to figure out that conversation needs to be re-fetched.
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.
👍
* Revert "feat: feature federation msg failed to send handling (AR-3015) (#1547)" This reverts commit 6011673. * chore(migration): out of conflict * chore: more code documentation * chore: recover small improv for uneeded call * chore: detekt * fix: sq migration updated after a really long time =/ * feat: offline backends - handling list-prekeys failed to list (AR-3171) (#1662) * feat: remove unused code, add mapping of proto contentc * feat: expand message target to include users to ignore * feat: resetting intentions on message targets * feat: resetting intentions on message targets * feat: test adjustment for target change * feat: adjusting signatures and simplify message sender mapping * feat: adjusting signatures and simplify message sender mapping * feat: adjusting signatures and simplify message sender mapping * feat: adjusting signatures and simplify message sender mapping * feat: clean code, and fallback for clients targets * feat: ignoring failed recipients mapping for non regular messages * feat: ignoring failed recipients mapping for non regular messages * feat: ignoring failed recipients mapping for non regular messages * feat: adding test coverage * feat: adding test coverage * feat: adding test coverage * chore: tmp for merge * feat: wip, merge sqw * feat: offline backends - users metadata (AR-3124) (#1698) * feat: adjust query to hide 1:1 convos without metadata * feat: adjustment query to consider deleted users logic as it is now * feat: tests for query conversations details * feat: pr comments single quotes * feat(offline-backends): users and conversations without metadata refetch pt1. (AR-3123) (#1736) * feat: adjust query to hide 1:1 convos without metadata * feat: adjustment query to consider deleted users logic as it is now * feat: tests for query conversations details * feat: persistence for getting users out of sync * feat: persistence for getting users out of sync * feat: pr comments single quotes * feat: invok operator * feat: persist failed convos * feat: cleanup * feat: tests cov * feat: tests cov * feat: tests cov * feat: tests cov * feat: refactor, persist users withoutmetadata with dedicated field * feat: refactor, relay on missing metadata field for refetch usres * feat: refactor, relay on missing metadata field for refetch conversations * feat: refactor, relay on missing metadata field for refetch conversations * feat: refactor, relay on missing metadata field for refetch conversations * feat: refactor, fixing tests * chore: add migration tests * feat(offline-backends): users and conversations without metadata refetch pt2. (AR-3123) (#1740) * feat: adjust query to hide 1:1 convos without metadata * feat: adjustment query to consider deleted users logic as it is now * feat: tests for query conversations details * feat: persistence for getting users out of sync * feat: persistence for getting users out of sync * feat: pr comments single quotes * feat: invok operator * feat: persist failed convos * feat: skeleton classes to build upon * feat: skeleton classes to build upon * feat: skeleton classes to build upon * feat: queries and metadata for syncing metadata * feat: provider di * feat: cleanup * feat: cleanup, clock instant * feat: tests cov * feat: tests cov * feat: tests cov * feat: tests cov * feat: refactor, persist users withoutmetadata with dedicated field * feat: refactor, relay on missing metadata field for refetch usres * feat: refactor, relay on missing metadata field for refetch conversations * feat: refactor, relay on missing metadata field for refetch conversations * feat: refactor, relay on missing metadata field for refetch conversations * feat: refactor, fixing tests * chore: add migration tests * chore: ddetekt * chore: new query * chore: test for use case * chore: test cov * chore: test cov * chore: change strategy to run sync after inc * chore: logging * chore: logging * chore: logging ref * fix: db ops * fix: db ops, user persistence fixed * chore: test cov * feat: test coverage * chore: wip for merge * fix: handle edge case error when no sessions * fix: tests * feat: wip merge * feat: wip merge * feat: conversation creation with offline backends (WPB-364) (#1774) * feat: add new response handling create convo v4 * feat: add new response handling create convo v4 test * feat: add new response handling create convo v4 test * feat: add tests cases and persitence of msg for failed to add * feat: add tests cases and persitence of msg for failed to add --------- Co-authored-by: Mohamad Jaara <[email protected]> * chore: preparing for rebase * chore: preparing merge * chore: preparing merge, better naming for func * chore: preparing merge, coverage * chore: preparing merge, coverage --------- Co-authored-by: Mohamad Jaara <[email protected]>
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764
The PR Description
What's new in this PR?
Issues
We need to refetch users and conversations without metadata.
Causes (Optional)
In case we don't have data due to a remote backend being offline, the clients will be able to refetch this data on demand.
Solutions
This PR adds:
Testing
Test Coverage (Optional)
Notes (Optional)
Will raise a new PR to add a new mechanism for refetch every 3 hours if the app comes to foreground.
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764
.