Skip to content

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
wants to merge 16 commits into
base: feature/database-relocation
Choose a base branch
from

Conversation

mpretty-cyro
Copy link
Collaborator

  • Added logic to handle config messages received via PNs
  • 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)
  • Updated the code to subscribe for all user config message changes (to better handle updates via PNs)
  • Removed duplicated code
  • Removed remaining database logic from notification extension
  • Fixed an issue with loading the disappearing messages config from a group

This is based on #450

…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
@mpretty-cyro mpretty-cyro self-assigned this May 13, 2025
@mpretty-cyro mpretty-cyro added enhancement New feature or request Jira This ticket is being tracked in Jira labels May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Jira This ticket is being tracked in Jira
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant