Skip to content

DBR - 6 - Remove database from message sending pipeline, send busy call message #455

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

Conversation

mpretty-cyro
Copy link
Collaborator

@mpretty-cyro mpretty-cyro commented May 19, 2025

  • Removed negative namespace PN workaround, fixed a BencodeDecoder bug
  • Refactored the MessageSender to no longer require database access
  • Refactored the attachment upload process to no longer require database access
  • Updated the OpenGroupAPI to no longer require database access
  • Updated the SessionNetworkAPI to no longer require database access
  • Updated the toProto functions to no longer required a Database instance
  • Updated a bunch of functions to be @mainactor (so we can ditch thread swapping code)
  • Added back logic to send the endCall message when receiving a call while on another call
  • Added community to AuthenticationMethod to help standardise the code behaviour
  • Added unit tests for new call dedupe logic
  • Fixed broken onboarding
  • Fixed call deduping and unread counts

This PR is based on #451

@mpretty-cyro mpretty-cyro self-assigned this May 19, 2025
@mpretty-cyro mpretty-cyro added enhancement New feature or request Jira This ticket is being tracked in Jira labels May 19, 2025
• 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
• Refactored the MessageSender to no longer require database access
• Refactored the attachment upload process to no longer require database access
• Updated the OpenGroupAPI to no longer require database access
• Added back logic to send the `endCall` message when receiving a call while on another call
• Added `community` to `AuthenticationMethod` to help standardise the code behaviour
• Updated the `toProto` functions to no longer required a `Database` instance
• Updated a bunch of functions to be @mainactor (so we can ditch thread swapping code)
• Updated SessionNetworkAPI so preparing requests doesn't use the database
• Fixed build errors
@mpretty-cyro mpretty-cyro force-pushed the feature/dbr6-handle-call-busy branch from e9deaf7 to b4cde8e Compare June 2, 2025 23:09
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.

2 participants