-
Notifications
You must be signed in to change notification settings - Fork 12
DBR - 5 - Config message handling #451
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
Open
mpretty-cyro
wants to merge
16
commits into
session-foundation:feature/database-relocation
Choose a base branch
from
mpretty-cyro:feature/dbr5-config-message-handling
base: feature/database-relocation
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
DBR - 5 - Config message handling #451
mpretty-cyro
wants to merge
16
commits into
session-foundation:feature/database-relocation
from
mpretty-cyro:feature/dbr5-config-message-handling
Conversation
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
…' into feature/merged-test
…ag' into feature/merged-test
…ag' into feature/merged-test # Conflicts: # Session.xcodeproj/project.pbxproj
• Updated the General cache to include the users seckey (rather than fetching it from the DB every time causing unneeded load) • Updated a bunch of Crypto usage to no longer need a `db` or `dependencies` instance passed to it • Added unit tests for General.Cache • Replaced `Identity.userExists` with `General.Cache.userExists` (no need for database access anymore) • Moved the SwarmPoller message handling logic into it's own function to make debugging stack traces a little easier • Cleaned up some hard-to-read logic
• Added the new MessageDeduplication table • Added a migration to populate the MessageDeduplication table • Added ExtensionHelper functions to store records in the AppGroup for deduplication purposes • Updated the logic to use MessageDeduplication table & files for deduplication purposes • Refactored message parsing to not rely on the database • Refactored message deduplication to not rely on the database in the PN extension • Removed the old ControlMessageProcessRecord table
• Added code to write user metadata to disk • Added code to write config dumps to disk • Added code to write push notification messages to disk • Added code to read push notification messages from disk on launch • Added code to calculate the unread count in the PN extension (based on the last known main app unread count) • Added code to replicate config dumps to the AppGroup for extensions to load • Added async/await read & write functions to Storage • Tweaked the logic when the user taps on a notification to wait until after the PN extension message files have been loaded (with a 3s timeout) • Fixed an issue where notifications were being overwritten in all cases (now using the serverHash as the identifier when available)
• Added unit tests for new ExtensionHelper functions • Tweaked the `#file` variables to use `#fileID` instead (relative to project dir) • Updated AppDelegate so it doesn't run when running unit tests (could slow other stuff down or cause bugs) • Fixed broken unit tests • Fixed an issue where the notification extension wasn't correctly reporting the successful handling of a push notification
• Added logic to handle config messages received via PNs • Updated the code to subscribe for all user config message changes (to better handle updates via PNs) • Fixed an issue with loading the disappearing messages config from a group
…weaks • Added code to handle invitations, promotions and kicked messages for groups • Added code to fallback to writing a message to disk and showing no notification (means the main app gets content without notifications quicker) • Added a work-around for an issue where PNs don't include the namespace value for messages sent to `revokedRetrievableGroupMessages` • Updated the code to retrieve the current users profile from libSession instead of the database (in most places) • Removed duplicated code • Removed remaining database logic from notification extension
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.
revokedRetrievableGroupMessages
This is based on #450