-
Notifications
You must be signed in to change notification settings - Fork 33
Initial Session Pro Integration, Query Refactoring and Bug Fixes #616
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
Merged
mpretty-cyro
merged 75 commits into
session-foundation:dev
from
mpretty-cyro:feature/libsession-message-wrapping
Jan 5, 2026
Merged
Initial Session Pro Integration, Query Refactoring and Bug Fixes #616
mpretty-cyro
merged 75 commits into
session-foundation:dev
from
mpretty-cyro:feature/libsession-message-wrapping
Jan 5, 2026
+26,483
−19,150
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
• Added initial `Network.SessionPro` structure • Wrapped a bunch of session pro types • Cleaned up some of the C interop DSL
• Added the get pro proof request • Added the get pro status request • Cleaned up the API to be closer to the proper structure • Fixed an issue with the add pro payment request
…ession-message-wrapping # Conflicts: # SessionMessagingKit/Jobs/AttachmentUploadJob.swift # SessionMessagingKit/Jobs/MessageSendJob.swift # SessionMessagingKit/Sending & Receiving/Message Handling/MessageSender+Groups.swift # SessionMessagingKit/Sending & Receiving/MessageSender.swift # SessionUtilitiesKit/Crypto/CryptoError.swift
• Updated the code to use the libSession function to determine message lengths • Fixed an issue where CTA modal benefits could incorrectly be truncated
…essage-wrapping # Conflicts: # SessionUIKit/Components/SwiftUI/ProCTAModal.swift
…e/libsession-message-wrapping # Conflicts: # Session/Conversations/ConversationVC+Interaction.swift # Session/Conversations/Input View/InputView.swift # Session/Settings/DeveloperSettings/DeveloperSettingsProViewModel.swift # Session/Settings/SettingsViewModel.swift # SessionMessagingKit/Jobs/ReuploadUserDisplayPictureJob.swift # SessionMessagingKit/LibSession/Config Handling/LibSession+Contacts.swift # SessionMessagingKit/LibSession/Config Handling/LibSession+Pro.swift # SessionMessagingKit/LibSession/Config Handling/LibSession+UserProfile.swift # SessionMessagingKit/Sending & Receiving/MessageSender+Convenience.swift # SessionMessagingKit/Utilities/SessionProState.swift # SessionUIKit/Components/SwiftUI/ProCTAModal.swift # SessionUtilitiesKit/General/Feature.swift # SignalUtilitiesKit/Media Viewing & Editing/Attachment Approval/AttachmentTextToolbar.swift
• Refactored the MessageViewModel to be a dumb data types instead of a monolithic query • Refactored the ConversationViewModel due to handle the updated MessageViewModel • Refactored OWSAudioPlayer into Swift • Refactored the OpenGroupManager and OpenGroupManagerCache to be a single actor (CommunityManager), it also holds community state in memory • Removed a bunch of GRDB-specific relationship code (just makes things messy since we have raw SQL elsewhere) • Fixed a bug where the ObservationBuilder could incorrectly run queries in cancelled contexts resulting in potential buggy outputs • Fixed a bug where outgoing voice messages might not be able to be played
• Updated the dev settings to show the different products • Fixed an issue where opening a conversation from global search would result in data missing
• Added some initial pro revocation list logic • Updated to libSession 1.5.9 • Fixed duplicate file warnings
• Fixed a bug where an invalid thread would be created on fresh install • Fixed a bug where restoring a device could result in the conversation list staying empty
• Fixed a possible deadlock during dependency initialisation • Fixed an issue preventing destroyed/kicked groups from rendering correctly • Fixed an auth issue when creating a new group • Fixed an issue where the input would incorrect allow text entry when the user can't send messages • Fixed an issue where conversations weren't correctly being identified as message requests • Fixed an issue where the empty state in a conversation could end up with the wrong font
Collaborator
Author
|
PR has passed regression testing and unit testing, the changes have had partial review (in the past) and is being handed over to wrap up the changes. The plan is to also look at running a full end-to-end testing before the next release so this PR is being merged to reduce conflicts with work being done in other branches. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
OpenGroupManagerandOpenGroupManagerCacheinto a singleCommunityManagerSessionThreadViewModelandMessageViewModel(see below for more info)OWSAudioPlayerinto SwiftSessionThreadViewModel Refactor
The
SessionThreadViewModelhas been renamed toConversationInfoViewModeland is now a simple struct (as opposed to a FetchableRecord with a handful of behemoth database queries)The
ConversationInfoViewModelandMessageViewModelnow get initialised with aConversationDataCachewhich is an object that holds a bunch of [ID -> Data] stores for various types that are needed to construct the aforementioned view models. TheConversationDataCachewill generally be populated via theConversationDataHelperwhich, when combined with ourObservableEventsystem, is where the majority of the work for this refactoring has gone. This helper essentially has 4 parts:determineFetchRequirements: Reviews any events which have come through and determines whether anything needs to be fetched from the databaseapplyNonDatabaseEvents: Updates the cached data directly based on delta information included in theObservableEventinstancesfetchFromDatabase: Fetches any data from the database based on the info returned fromdetermineFetchRequirements, this function will also resolve any dependant data that newly fetched objects need if they aren't already in the cachefetchFromLibSession: Retrieves requested data from libSessionUsing the above setup all screens which contain conversation or message data now use these two view models, and can share the state of the view models between each other to reduce the need to refetch data when entering a new screen
Some additional changes included due to the above are:
displayNameRetrieverthroughoutConversationDataHelperConversationDataHelper