Commit Graph

97 Commits (master)

Author SHA1 Message Date
Morgan Pretty 4b4c69a533 Fixed broken unit tests, tweak to CI script 2 weeks ago
Morgan Pretty 9491b4a97b Fixed a crash and config issue
• Fixed a bad memory crash which could occur when returning from the background
• Fixed an issue where config messages were incorrectly getting double wrapped in protobuf wrappers
3 weeks ago
Morgan Pretty c6c2881338 Reworked the libSession network to be instance based
• Fixed an issue where the DisappearingMessagesJob was getting run for every individual message process instead of just once after processing all messages from a poll
• Tweaked the polling logic to split the user, groups and community pollers into separate queues
• Tweaked the logic to restart the open group poller immediately after joining a community (to avoid an edge-case where there could be a long delay before the initial poll is made)
• Tweaked the logic for checking if PNs are susceptible to failure to only dispatch to the main thread once
• Cleaned up some warnings
• Updated the app versioning to be at the project level instead of target level
• Added the ability to define a unique hash for a job for deduplication
1 month ago
Morgan Pretty c065abc584 Cleaned up a bunch of warnings, renamed a couple of folders 1 month ago
Morgan Pretty 097f9c2903 Fixed scheme and SessionSnodeKitTest runs 2 months ago
Morgan Pretty 9833ac91de Fixed the broken unit tests 2 months ago
Morgan Pretty 7eb7eda74e [WIP] Cleaned up interface, error handling and redundant code 2 months ago
Morgan Pretty 1ee4c29a16 [WIP] Pulling in a bunch of changes around request management 2 months ago
Morgan Pretty 756e256d9a Moving libSession into SessionUtilitiesKit to expose it to other targets 2 months ago
Morgan Pretty 661720a988 Merge remote-tracking branch 'upstream/dev' into disappearing-message-redesign
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Meta/Translations/ar.lproj/Localizable.strings
#	Session/Meta/Translations/be.lproj/Localizable.strings
#	Session/Meta/Translations/bg.lproj/Localizable.strings
#	Session/Meta/Translations/bn.lproj/Localizable.strings
#	Session/Meta/Translations/cs.lproj/Localizable.strings
#	Session/Meta/Translations/da.lproj/Localizable.strings
#	Session/Meta/Translations/de.lproj/Localizable.strings
#	Session/Meta/Translations/el.lproj/Localizable.strings
#	Session/Meta/Translations/en.lproj/Localizable.strings
#	Session/Meta/Translations/eo.lproj/Localizable.strings
#	Session/Meta/Translations/es-ES.lproj/Localizable.strings
#	Session/Meta/Translations/fa.lproj/Localizable.strings
#	Session/Meta/Translations/fi.lproj/Localizable.strings
#	Session/Meta/Translations/fil.lproj/Localizable.strings
#	Session/Meta/Translations/fr.lproj/Localizable.strings
#	Session/Meta/Translations/hi.lproj/Localizable.strings
#	Session/Meta/Translations/hr.lproj/Localizable.strings
#	Session/Meta/Translations/hu.lproj/Localizable.strings
#	Session/Meta/Translations/id.lproj/Localizable.strings
#	Session/Meta/Translations/it.lproj/Localizable.strings
#	Session/Meta/Translations/ja.lproj/Localizable.strings
#	Session/Meta/Translations/ko.lproj/Localizable.strings
#	Session/Meta/Translations/ku.lproj/Localizable.strings
#	Session/Meta/Translations/lt.lproj/Localizable.strings
#	Session/Meta/Translations/lv.lproj/Localizable.strings
#	Session/Meta/Translations/ne-NP.lproj/Localizable.strings
#	Session/Meta/Translations/nl.lproj/Localizable.strings
#	Session/Meta/Translations/no.lproj/Localizable.strings
#	Session/Meta/Translations/pl.lproj/Localizable.strings
#	Session/Meta/Translations/pt-BR.lproj/Localizable.strings
#	Session/Meta/Translations/pt-PT.lproj/Localizable.strings
#	Session/Meta/Translations/ro.lproj/Localizable.strings
#	Session/Meta/Translations/ru.lproj/Localizable.strings
#	Session/Meta/Translations/si-LK.lproj/Localizable.strings
#	Session/Meta/Translations/sk.lproj/Localizable.strings
#	Session/Meta/Translations/sl.lproj/Localizable.strings
#	Session/Meta/Translations/sv-SE.lproj/Localizable.strings
#	Session/Meta/Translations/th.lproj/Localizable.strings
#	Session/Meta/Translations/tr.lproj/Localizable.strings
#	Session/Meta/Translations/uk.lproj/Localizable.strings
#	Session/Meta/Translations/vi.lproj/Localizable.strings
#	Session/Meta/Translations/zh-CN.lproj/Localizable.strings
#	Session/Meta/Translations/zh-TW.lproj/Localizable.strings
#	SessionMessagingKit/Configuration.swift
#	SessionUtilitiesKit/Database/Storage.swift
4 months ago
Morgan Pretty c74d9a89f5 Fixed broken tests 7 months ago
Morgan Pretty 90cd3fb5e0 Merge remote-tracking branch 'upstream/dev' into disappearing-message-redesign
# Conflicts:
#	_SharedTestUtilities/MockJobRunner.swift
8 months ago
Morgan Pretty 42b49e0227 Added unit tests to verify migrations between all versions work
Fixed a busted test import
8 months ago
Morgan Pretty 5b7c9d866c Updated the 'MessageReceiverDisappearingMessagesSpec' to the updated pattern 8 months ago
Morgan Pretty c4aadaff1c Fixed the broken tests and updated test dependencies
Properly fixed the busted migration issue
Updated to the latest version of Quick and Nimble (unit testing libraries)
Updated the tests based on the above
8 months ago
Morgan Pretty 9c9fb09254 Merge remote-tracking branch 'upstream/dev' into feature/blinded-message-request-setting
# Conflicts:
#	SessionMessagingKit/Configuration.swift
9 months ago
Morgan Pretty d863004e6d Added a setting to control community message request polling
Added logic to broadcast the community message request acceptance to SOGS so we can communicate it to message request senders
Fixed an issue where database setting changes wouldn't trigger a live update on a settings screen
Fixed an issue where some setting toggles wouldn't animate the state change
Fixed a rarw force-unwrap crash
9 months ago
Morgan Pretty a41f1c1366 Fixed the broken tests
Cleaned up the Dependencies so that tests can run synchronously without having to custom set queues as much
Sorted out the crypto and network dependencies to avoid needing weird dependency inheritance
Fixed the flaky tests so they are no longer flaky
Fixed some unexpected JobRunner behaviours
Updated the CI config to use a local build directory for derivedData (now works with build tweaks)
10 months ago
Morgan Pretty e768bebe6d Merge remote-tracking branch 'upstream/dev' into feature/job-runner-unit-tests
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Meta/Session-Prefix.pch
#	Session/Notifications/SyncPushTokensJob.swift
#	Session/Utilities/BackgroundPoller.swift
#	SessionMessagingKit/Configuration.swift
#	SessionMessagingKit/Database/Models/Profile.swift
#	SessionMessagingKit/Jobs/Types/AttachmentDownloadJob.swift
#	SessionMessagingKit/Jobs/Types/AttachmentUploadJob.swift
#	SessionMessagingKit/Jobs/Types/DisappearingMessagesJob.swift
#	SessionMessagingKit/Jobs/Types/FailedAttachmentDownloadsJob.swift
#	SessionMessagingKit/Jobs/Types/FailedMessageSendsJob.swift
#	SessionMessagingKit/Jobs/Types/GroupLeavingJob.swift
#	SessionMessagingKit/Jobs/Types/MessageReceiveJob.swift
#	SessionMessagingKit/Jobs/Types/MessageSendJob.swift
#	SessionMessagingKit/Jobs/Types/NotifyPushServerJob.swift
#	SessionMessagingKit/Jobs/Types/RetrieveDefaultOpenGroupRoomsJob.swift
#	SessionMessagingKit/Jobs/Types/SendReadReceiptsJob.swift
#	SessionMessagingKit/Jobs/Types/UpdateProfilePictureJob.swift
#	SessionMessagingKit/Sending & Receiving/MessageSender.swift
#	SessionMessagingKit/Sending & Receiving/Pollers/ClosedGroupPoller.swift
#	SessionMessagingKit/Utilities/AppReadiness.m
#	SessionMessagingKitTests/Open Groups/OpenGroupManagerSpec.swift
#	SessionMessagingKitTests/_TestUtilities/TestOnionRequestAPI.swift
#	SessionShareExtension/ShareNavController.swift
#	SessionSnodeKit/Jobs/GetSnodePoolJob.swift
#	SessionUtilitiesKit/Configuration.swift
#	SessionUtilitiesKit/Database/Utilities/Database+Utilities.swift
#	SessionUtilitiesKit/JobRunner/JobRunner.swift
#	SignalUtilitiesKit/Meta/SignalUtilitiesKit.h
#	SignalUtilitiesKit/Utilities/SSKAsserts.h
10 months ago
Morgan Pretty 703b1d9788 CI tweaks and tweak for initial UX issue with 'blinded25' id
Added parallelisation for the unit tests
Added the SSH_KEY env variable for the 'Upload artifacts' step
Disabled xcbeautify for the prod build (as I expect it's suppressing the build error)
Disabled support for starting a conversation with a 'blinded25' id (would be invalid at this stage)
Fixed a broken unit test
10 months ago
Morgan Pretty c86cc0ed9c CI tweaks and incremented build number
Added the XCBeautify pod (so the CI doesn't need to separately install something)
Updated the CI build script to use XCBeautify
Fixed some broken unit tests
10 months ago
Morgan Pretty 43b2aaf8bb Trying to progress on the CI builds
Reworked the way libSession-util builds to use a static library and be less hacky
Updated to the latest version of WebRTC-lib (no longer includes bitcode)
Removed the 'skip_web_rtc_re_rsync' patch as it's no longer an issue since the bitcode was removed so the framework is much smaller
10 months ago
Morgan Pretty 6f4bdcdccb Moved some logic outside of DBWrite closures to prevent hangs
Updated the SessionApp.presentConversation function from using the DBWrite thread if it didn't need to
Updated the PagedDatabaseObserver to process database commits async on a serial queue to avoid holding up the DBWrite thread
Moved another Atomic mutation outside of a DBWrite closure
Refactored the PagedDatabaseObserver 'databaseDidCommit' logic to be much more straightforward
Tweaked a couple of flaky unit tests
11 months ago
Morgan Pretty 0225f436bd Podfile tweaks to speed up sim builds, unit tests & minor bug fix
Added a patch to the Podfile to avoid rsync'ing and signing WebRTC-lib for simulator builds shaving off 10+ seconds of build time per target due to the sheer size of the WebRTC debug framework
Added some basic unit tests to validate the current search behaviour
Fixed some buggy search behaviours
11 months ago
Morgan Pretty 5e2e103ee1 Resolved the remaining known internal testing issues
Removed the 'immediatelyOnMain' extensions as they would break in some cases (eg. upstream errors with multiple 'receive(on:)' calls) resulting in logic running on unexpected threads
Updated the ReplaySubject to add subscribers in an Atomic just to be safe
Updated the code to remove the invalid open group when the user receives an error after joining
Fixed a bug with editing closed group members
Fixed broken unit tests
11 months ago
Morgan Pretty 6cf7cc42ab Fixed up the remaining reported internal testing issues
Removed the 'readPublisherFlatMap/writePublisherFlatMap' functions as they easily resulted in behaviours which held up database threads
Tweaked the logic around starting the open group pollers to avoid an unlikely atomic lock blocks
Updated some logic to avoid accessing database read threads for longer than needed
Updated the OpenGroupManager to only update the 'seqNo' value for valid messages
Cleaned up some double Atomic wrapped instances which had some weird access behaviours
Fixed an issue where a database read thread could have been started within a database write thread
Fixed an issue where the ReplaySubject might not emit values in some cases
11 months ago
Morgan Pretty d8ae9669c8 Fixed a breaking issue and a few other minor bugs
Fixed a busted version comparison
Fixed an issue where the config dump population wasn't setting the 'created' timestamp for contacts
Fixed an issue where the 'SyncPushTokensJob' could run logic on the wrong thread
Fixed a bug where the 'scroll to bottom' button wouldn't initial be visible in some cases
Fixed a bug where the 'scroll to bottom' button would fade out when there were subsequent pages
Fixed a bug where an open group image might not get downloaded in some cases
Fixed an issue where we would incorrectly append a wildcard character to the end of a search term that ended in a quotation mark
Finished refactoring the OpenGroupAPI to use PreparedSendData
11 months ago
Morgan Pretty 53a5db0ea5 Fixed a number of issues found during internal testing
Added copy for an unrecoverable startup case
Added some additional logs to better debug ValueObservation query errors
Increased the pageSize to 20 on iPad devices (to prevent it immediately loading a second page)
Cleaned up a bunch of threading logic (try to avoid overriding subscribe/receive threads specified at subscription)
Consolidated the 'sendMessage' and 'sendAttachments' functions
Updated the various frameworks to use 'DAWRF with DSYM' to allow for better debugging during debug mode (at the cost of a longer build time)
Updated the logic to optimistically insert messages when sending to avoid any database write delays
Updated the logic to avoid sending notifications for messages which are already marked as read by the config
Fixed an issue where multiple paths could incorrectly get built at the same time in some cases
Fixed an issue where other job queues could be started before the blockingQueue finishes
Fixed a potential bug with the snode version comparison (was just a string comparison which would fail when getting to double-digit values)
Fixed a bug where you couldn't remove the last reaction on a message
Fixed the broken media message zoom animations
Fixed a bug where the last message read in a conversation wouldn't be correctly detected as already read
Fixed a bug where the QuoteView had no line limits (resulting in the '@You' mention background highlight being incorrectly positioned in the quote preview)
Fixed a bug where a large number of configSyncJobs could be scheduled (only one would run at a time but this could result in performance impacts)
11 months ago
Morgan Pretty 5db254303a Removed the wip pruning logic (no longer needed)
Fixed broken unit tests
11 months ago
Morgan Pretty f07313c7ac Fixed a number of bugs found during internal testing
Updated to the latest libSession to increase the available size for config message content (size check now happens after compression rather than before)
Added some additional logs for config size info
Fixed a bug where the database could be accessed before the migrations ran which could result in unexpected behaviours
Fixed a bug where you couldn't mark a non one-to-one thread as read/unread
Fixed a bug where a database initialization failure wouldn't result in a migration failure (user would be stuck on the splash screen indefinitely)
Fixed a bug where if a message was too large for the screen the conversation would open it centered on the screen (now it will be positioned to the top)
Started looking at broken unit tests
Increased the build number
11 months ago
Morgan Pretty d2c82cb915 Started working on some config contact pruning logic
Added support for a ConfirmationModal with an input field
Added a mechanism on Debug builds to export the database and it's key
Added logic to catch exceptions thrown within libSession (need to actually plug it in)
Added a debug-only mechanism to export the users database and (encrypted) database key
Added a few unit tests to check the CONTACTS config message size constraints
11 months ago
Morgan Pretty 8c8453d922 Updated to the latest libSession, fixed remaining items
Updated to the latest libSession version
Updated the 'hidden' logic to be based on a negative 'priority' value
Added an index on the Quote table to speed up conversation query
Fixed an odd behaviour with GRDB and Combine (simplified the interface as well)
Fixed an issue where migrations could fail
1 year ago
Morgan Pretty ffdc59b704 Fixed a few issues with the JobRunner
Updated the JobRunner to support dependency injection
Updated the DataExtractionNotification to take a 'sentTimestamp' when created to reduce the chance for duplicates being sent
Fixed an issue where checking current and pending jobs wasn't including blocking jobs
Fixed an issue where the 'hasPendingOrRunningJob' check didn't actually include running jobs
Fixed some odd behaviours with job dependencies
Fixed an incorrect failure count check
1 year ago
Morgan Pretty 1334a64031 Removed usages of Box.KeyPair, removed a TODO 1 year ago
Morgan Pretty 7ee84fe0d3 Cleaned up a bunch of code, added pinned and hidden handling
Added in logic to handle the 'hidden' state
Replaced the 'Group Created' message with an empty state
Cleaned up a bunch of boilerplate code
1 year ago
Morgan Pretty 8eed08b5b4 Updated to the latest lib, started handling UserGroups
Added unit tests for the UserGroup config type
Updated the logic to use the 'pinnedPriority' and deprecated 'isPinned' (not sorting yet but using the value)
Updated the code to use the libSession community url parsing instead of custom parsing
Fixed an issue where initialising Data with a libSession value wasn't returning null when the data had no actual value
Fixed an issue where the OpenGroupPoller could user an incorrect failure could when handling poll responses
Fixed the UpdateExpiryRequest signature
1 year ago
Morgan Pretty c8a199a8ba Fixed the remaining broken tests 1 year ago
Morgan Pretty f30b383bb8 Updated to the latest version of libSession-util
Updated the SharedConfigMessage type to have a TTL of 30 days
Updated the SnodeAPI to have a 'poll' method to be more consistent with the OpenGroupAPI (it also does multiple things now so is cleaner)
Added logic to limit the number of config messages to be retrieved per poll
Added the 'ValidatableResponse' protocol to standardise SnodeAPI response validation
Added the libSession version to the logs
Fixed an issue where the user profile pic wouldn't get synced correctly due to memory going out of scope
Fixed some threading issues
Refactored the thread variants to follow the updated terminology (will think about refactoring other code areas later)
Cleaned up the Combine error handling
Started fixing broken unit tests
1 year ago
Morgan Pretty 345b693225 Fixed build issues, bugs, added unit tests and added the ConvoInfoVolatile handling
Added the unit tests for the ConvoInfoVolatile
Added icons to the swipe actions
Updated jobs to be able to be prioritised (and added priorities to the launch jobs to avoid some odd behaviours)
Fixed some build issues resulting from merging
Fixed an issue with the open group pubkey encoding
Fixed an issue where an imageView could get it's image set on a background thread
Fixed a bug where the swipe actions weren't getting theming applied when the theme changed
Fixed a bug where scheduling code after the next db transaction completes couldn't be nested (resulting in code not running)
Fixed a bug where the PagedDataObserver might not notify of unobserved changes if they reverted previous unobserved changes
Fixed a couple of incorrect SQL ordering use cases (was overriding instead of appending ordering)
Fixed an issue where the app would re-upload the avatar every launch (only affected this branch)
Fixed an issue where the home screen wouldn't update group avatars when their profile data changed
1 year ago
Morgan Pretty 29ba25916c Fixed a few issues uncovered when testing the shared util feature flag
Added code to handle an edge-case where an account could exist without a display name if crashing at the right time when onboarding/linking (now request a display name on start up)
Fixed a crash which could occur when downloading new avatars
Fixed a minor layout issue with the seed reminder view
1 year ago
Morgan Pretty 4d487f2686 Fixed the broken unit tests 1 year ago
Morgan Pretty e3a080dd5b Updated to the latest version of the libSession-utl (contacts size)
Fixed some broken unit tests (still some broken ones)
1 year ago
Morgan Pretty 893967e380 Updated to the latest config lib and added it's unit tests 1 year ago
Morgan Pretty 174725c7fd Removed unneeded imports of libraries to understand usage
Refactored some 3rd-part standard encryption to use CryptoKit
Removed the PromiseKit pod
Fixed the broken tests
1 year ago
Morgan Pretty 70ff2b49f0 Fixed the broken tests and resolved some warnings
Stopped migration logs from appearing in unit tests

# Conflicts:
#	Session/Settings/RemoveUsersModal.swift
#	SessionMessagingKitTests/Open Groups/OpenGroupManagerSpec.swift
#	SessionTests/Conversations/Settings/ThreadDisappearingMessagesViewModelSpec.swift
#	SessionTests/Conversations/Settings/ThreadSettingsViewModelSpec.swift
1 year ago
Morgan Pretty ca4ce52402 Fixing the broken unit tests, resolved the remaining TODOs
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	SessionMessagingKitTests/Open Groups/Models/BatchRequestInfoSpec.swift
#	SessionMessagingKitTests/Open Groups/OpenGroupAPISpec.swift
#	SessionMessagingKitTests/Open Groups/OpenGroupManagerSpec.swift
#	SessionMessagingKitTests/_TestUtilities/TestOnionRequestAPI.swift
#	SessionTests/Conversations/Settings/ThreadSettingsViewModelSpec.swift
#	SessionUtilitiesKit/Networking/BatchResponse.swift
#	SessionUtilitiesKitTests/Networking/BatchResponseSpec.swift
1 year ago
Morgan Pretty f5933bdf75 Updated to the latest version of the shared util library
# Conflicts:
#	Session/Onboarding/Onboarding.swift
1 year ago
Morgan Pretty d03d2ce8ab Fixed remaining issues, cleaned up memory & logic
# Conflicts:
#	Session.xcodeproj/project.pbxproj
1 year ago
Morgan Pretty a1e09d830f Got test working 1 year ago
Morgan Pretty edf3bde573 Started working on the integration
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	SessionMessagingKit/Configuration.swift
#	SessionMessagingKit/Database/Migrations/_012_AddClosedGroupInfo.swift
#	SessionMessagingKit/Database/Migrations/_013_AutoDownloadAttachments.swift
#	SessionMessagingKit/Open Groups/Models/SOGSBatchRequest.swift
#	SessionSnodeKit/OnionRequestAPI.swift
#	SessionSnodeKit/SSKDependencies.swift
#	SessionTests/Conversations/Settings/ThreadDisappearingMessagesViewModelSpec.swift
#	SessionTests/Conversations/Settings/ThreadSettingsViewModelSpec.swift
#	SessionTests/Settings/NotificationContentViewModelSpec.swift
#	SessionUtilitiesKit/Networking/BatchResponse.swift
1 year ago