Commit Graph

770 Commits

Author SHA1 Message Date
Morgan Pretty f532496ee4 Increased build and version numbers 2023-12-11 17:04:57 +11:00
Morgan Pretty de7d85f4cb Merge remote-tracking branch 'upstream/dev' into fix/media-interactions 2023-10-13 15:03:57 +11:00
Morgan Pretty 89b38dc2f5
Merge pull request #928 from mpretty-cyro/fix/blocked-contacts-crash
Fixed a crash on the blocked contacts screen and refactoring
2023-10-12 16:15:54 +11:00
Morgan Pretty bd98db2612 Fixed a few bugs and crashes around media interactions
Fixed a crash when trying to grant permission to access additional photos
Fixed a bug where audio files would incorrectly get recognised as voice messages
Replaced our custom video/audio players with the native ones (which have additional built-in controls)
Updated the errors from SSKKeychainStorage to include useful information
Updated layout for audio attachments
2023-10-12 16:03:00 +11:00
Morgan Pretty f97170fdcd Fixed a crash on the blocked contacts screen and refactoring
Refactored the SessionThreadViewModel to reduce boilerplate and clean up the interface a little
Refactored the MessageRequestsViewController to use the SessionTableViewController
Fixed a crash when returning from the background on the BlockedContactsViewModel
Fixed some minor lag on the NotificationSoundViewModel
Added an optional initial loading message to the SessionTableViewController
2023-10-11 15:18:39 +11:00
Morgan Pretty 085a1a59aa Fixed an issue where the messages might not get reprocessed when they should
Dropped the auto-incrementing id from the SnodeReceivedMessageInfo
Changed the 'key, hash' from a uniqueKey to a primaryKey to allow "upsert" behaviours to work
2023-10-06 18:03:12 +11:00
Morgan Pretty ed33e1f2e2 Merge remote-tracking branch 'upstream/dev' into fix/blocked-contacts-issues 2023-10-03 13:43:57 +11:00
Morgan Pretty 2cff251e8d Fixed a bug with the blocked contacts list
Fixed a bug where blocked contacts without profile information wouldn't be included in the blocked contacts list
Fixed broken test build issues
Increased build and version numbers
2023-10-03 13:43:09 +11:00
Morgan Pretty 42b49e0227 Added unit tests to verify migrations between all versions work
Fixed a busted test import
2023-10-03 12:52:29 +11:00
Morgan Pretty 5917cf103f Refactored the LintLocalizableStrings
Added inline errors & warnings (regex could use some work to remove invalid cases)
Added a build step to validate the strings are included in the app and it's extensions
2023-09-25 18:32:56 +10:00
Morgan Pretty b280c0a852 Increased Build and Version Numbers and removed extra strings 2023-09-22 15:00:49 +10:00
Morgan Pretty 7628edbb1c Merge remote-tracking branch 'upstream/dev' into fix/xcode-15-build-issues 2023-09-22 14:52:45 +10:00
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
2023-09-22 14:49:39 +10:00
Morgan Pretty 8fee4edf34 Updated to the latest translations from Crowdin 2023-09-22 09:28:51 +10:00
Morgan Pretty 4c934d2fda [WIP] Started work fixing XCode 15 build issues
Reworked the EmojiGenerator to structure the 'EmojiWithSkinTones+String" file as the original structure was causing XCode 15 to build forever
Reworked the seed node certificate loading in an effort to fix a crash
Updated to the latest version of webp
Commented out a line causing build issues
Fixed a number of build warnings
Fixed an issue which could cause migration issues when upgrading from certain old versions
2023-09-20 16:57:59 +10:00
Morgan Pretty 67ab1e5194 Increased the build number for RC build 2023-09-08 17:45:45 +10:00
Morgan Pretty a2f1f36d2c Fixed a number of issues with the Notification Service Extension
Fixed an issue where receiving a PN for outgoing messages could break the NotificationServiceExtension
Fixed an issue where the NotificationServiceExtension could startup in an invalid way resulting in subsequent PNs failing to process
Fixed an issue where you could incorrectly receive multiple generic notifications after receiving an incoming call notification
Fixed an issue where the read state syncing might not clear notifications from the notification center
Fixed an issue with parsing Bencoded data
Updated the PN subscription to subscribe to CONVO_INFO_VOLATILE notifications (update read state)
Updated the NotificationServiceExtension to use standard message processing where possible
Updated the NotificationServiceExtension to update the app badge based on a database query
2023-09-08 11:42:04 +10:00
Morgan Pretty e6c26e7ff4 Cleaned up the GRDB interface for complex queries 2023-08-17 16:39:47 +10:00
Morgan Pretty 42853a08c9 Fixed a couple of minor outgoing quote bugs
Added a nicer mechanism for using table aliases
Fixed a bug where the quote preview view close button could overlap the content
Fixed a bug where an outgoing quote wouldn't show it's thumbnail in some cases
Fixed a bug where quoting a link preview wouldn't show the link preview attachment
2023-08-17 11:28:03 +10:00
Morgan Pretty ef5aa927a0 Added logic to use the setting if it's already been sent in a config
Added the ability to define requirements for migrations (in case some data or state needs to be loaded for a migration to be able to be performed correctly)
2023-08-11 18:48:14 +10:00
Morgan Pretty 9c9fb09254 Merge remote-tracking branch 'upstream/dev' into feature/blinded-message-request-setting
# Conflicts:
#	SessionMessagingKit/Configuration.swift
2023-08-11 18:29:33 +10:00
Morgan Pretty 32527d7e83
Merge pull request #856 from mpretty-cyro/feature/updated-push-server
Updated Push Notification API Integration
2023-08-11 18:02:20 +10:00
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
2023-08-11 18:02:06 +10:00
Morgan Pretty 5285d81177 Fixed a few more PN logic issues
Sorted out some more threading issues
Removed a redundant SyncPushTokensJob run
Fixed an issue where the NotificationServiceExtension could incorrectly setup the database before setting up it's context
Fixed a few warnings
Removed a bunch of legacy code
Refactored the MainAppContext from Objective C into Swift
2023-08-10 14:43:40 +10:00
Morgan Pretty 0e952b40bb Removed 'useSharedUtilForUserConfig' flag and most legacy config logic 2023-08-03 09:09:33 +10:00
Morgan Pretty 18ee9d34fa Merge remote-tracking branch 'upstream/dev' into feature/updated-push-server
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	SessionMessagingKit/Open Groups/Types/SodiumProtocols.swift
#	SessionMessagingKit/Sending & Receiving/Message Handling/MessageSender+ClosedGroups.swift
#	SessionMessagingKitTests/_TestUtilities/MockAeadXChaCha20Poly1305Ietf.swift
#	SessionUtilitiesKit/JobRunner/JobRunner.swift
2023-08-02 14:35:16 +10:00
Morgan Pretty 1b0fda56ad Merge remote-tracking branch 'upstream/dev' into feature/updated-push-server
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Meta/AppDelegate.swift
#	Session/Meta/Translations/de.lproj/Localizable.strings
#	Session/Meta/Translations/en.lproj/Localizable.strings
#	Session/Meta/Translations/es.lproj/Localizable.strings
#	Session/Meta/Translations/fa.lproj/Localizable.strings
#	Session/Meta/Translations/fi.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/id-ID.lproj/Localizable.strings
#	Session/Meta/Translations/it.lproj/Localizable.strings
#	Session/Meta/Translations/ja.lproj/Localizable.strings
#	Session/Meta/Translations/nl.lproj/Localizable.strings
#	Session/Meta/Translations/pl.lproj/Localizable.strings
#	Session/Meta/Translations/pt_BR.lproj/Localizable.strings
#	Session/Meta/Translations/ru.lproj/Localizable.strings
#	Session/Meta/Translations/si.lproj/Localizable.strings
#	Session/Meta/Translations/sk.lproj/Localizable.strings
#	Session/Meta/Translations/sv.lproj/Localizable.strings
#	Session/Meta/Translations/th.lproj/Localizable.strings
#	Session/Meta/Translations/vi-VN.lproj/Localizable.strings
#	Session/Meta/Translations/zh-Hant.lproj/Localizable.strings
#	Session/Meta/Translations/zh_CN.lproj/Localizable.strings
#	Session/Notifications/SyncPushTokensJob.swift
#	SessionMessagingKit/Sending & Receiving/Message Handling/MessageReceiver+ClosedGroups.swift
#	SessionMessagingKit/Sending & Receiving/Message Handling/MessageSender+ClosedGroups.swift
#	SessionShareExtension/ShareNavController.swift
2023-08-01 16:05:36 +10:00
Morgan Pretty b471a32209 Merge remote-tracking branch 'upstream/dev' into feature/job-runner-unit-tests
# Conflicts:
#	Session/Conversations/ConversationVC+Interaction.swift
#	SessionMessagingKit/Open Groups/OpenGroupAPI.swift
#	SessionMessagingKit/Open Groups/OpenGroupManager.swift
2023-08-01 14:39:00 +10:00
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)
2023-08-01 14:27:41 +10:00
Morgan Pretty 6ad303d450 Updated build and version numbers 2023-07-24 12:30:30 +10:00
Morgan Pretty f373a989a8 Fixes for user config crashes
Added a method to determine if the database is suspended
Updated the code to show the "Failed" state if sending a message fails due to a suspended database
Prevented a crash which could occur in rare cases when accessing the Seed via the home screen prompt (direct user to share logs with session - db locked or device in an invalid state)
Prevented a crash which could occur when trying to send a message due to failing to retrieve the mnemonic (db locked or device in an invalid state)
Fixed a bug where optimistic messages could end up appearing multiple times
Fixed a crash with the QRCode scanner
Fixed a crash when trying to take a video attachment
Fixed a crash where the image picker grid could go out of bounds when selecting elements
Fixed a crash which could occur when a user provides a recovery password with a word that contains less than 3 characters
Fixed a potential issue where the dependency injection could result in a stale date being used in some places (removing the DI here, proper fix requires larger changes in another branch)
2023-07-20 12:29:56 +10:00
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
2023-07-18 10:02:51 +10:00
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
2023-07-13 17:57:08 +10:00
Morgan Pretty 69ddb782a1 Attempting to cache the Pods folder to speed up the CI
Fixed a CocoaPods warning
2023-07-13 16:01:57 +10:00
Morgan Pretty 3c81e3a487 Changed the submodule to be via HTTPS instead of SSH
Cleaned out some old, unused references from project files
2023-07-12 15:28:28 +10:00
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
2023-07-12 15:03:42 +10:00
Morgan Pretty 38420997b0 Fixed a couple of bugs and made some performance tweaks
Cleaned up some duplicate poller logic (avoid going back to the main queue)
Updated the code to remove a profile image if a user sends a message which doesn't have a profile image (ie. they've explicitly removed it)
Fixed an issue where some more logic could incorrectly run in the DBWrite queue
Fixed a bug where the OpenGroupPoller could stop polling when getting an error
Fixed a bug where messages which had the same timestamp wouldn't get correctly marked as read when scrolling under the right circumstances
2023-07-10 17:56:58 +10:00
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
2023-07-07 13:20:32 +10:00
Morgan Pretty a7761697a9 More performance logging and some minor optimisations
Added code to throttle the 'markAsRead' logic when scrolling to 100ms
Added a launch counter so we will always get error logs on launch if the database is suspended
Updated the logging to also indicate whether it's the DBWrite queue
Moved a couple of Atomic mutations outside of DB write closure on the off chance they are blocking
2023-07-06 15:39:41 +10:00
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
2023-07-04 17:09:50 +10:00
Morgan Pretty 3151aa8901 Fixed an issue where the users push token might never get unregistered 2023-07-03 17:13:15 +10:00
Morgan Pretty 7b70f8d535 Increased build number 2023-07-03 10:45:13 +10:00
Morgan Pretty 1ed86d483e Tweaks to the Build pre-action
Removed the flag to automatically reset and check out submodules (seemed too destructive for a default behaviour)
Updated all targets to run the 'Validate pre-build actions' script
Updated the build script to return a success instead of an error (forgot that this was the point of the 'Validate pre-build actions' script)
2023-07-03 09:54:04 +10:00
Morgan Pretty ec81236615 Fixed a few more threading-related bugs
Updated the libSession build script to reset and checkout submodules based on a flag (simplify the process)
Updated the share and notification extensions to generate the DSYM on debug builds to allow for better debugging
Added additional startup logging for debugging purposes
Tweaked the SNLog function to indicate when the log happens on the main thread (slightly less efficient but should help track down logic incorrectly running on the main thread)
Fixed a bug where we weren't recording the last PN server registration (so would re-register every time)
Fixed a bug where if the user sent the app to the background too quickly after launching the app wouldn't successfully startup when re-opening
Fixed a bug where the Notification and Share extensions would assert because they were dispatching the post-migration logic to the main thread (due to the threading changes in a previous release)
Fixed a bug where the Notification extension would incorrectly poll open groups on the main thread
2023-06-30 17:59:37 +10:00
Morgan Pretty d0be7f786c Fixed a hang, removed redundant libs, files and code
Fixed an issue where returning the app from the background would result in the app staying permanently on the splash screen
Included a CRC32 implementation so we can drop the CryptoSwift dependenciy (using CryptoKit everywhere else)
Removed 'SocketRocket' (unused)
Removed the `xcode_14_3_workaround` post-install hook (fixed with CocoaPods 1.12.1)
Removed the `enable_fts5_support` post-install hook (enabled by default since GRDB 6.7.0 so redundant)
Removed the `enable_whole_module_optimization_for_crypto_swift` post-install hook (dropped CryptoSwift support)
Cleared out a bunch of headers from the Signal-Bridging-header file (direct imports instead to reduce incremental build sizes)
Deleted some unused code
2023-06-29 16:58:23 +10:00
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
2023-06-28 18:03:40 +10:00
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
2023-06-26 18:03:40 +10:00
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)
2023-06-23 17:54:29 +10:00
Morgan Pretty 0a638bf37b Fixed the broken JobRunner tests
Cleaned up the 'isRunningTests' logic so it isn't dependant on having an AppContext
2023-06-20 16:33:06 +10:00
Morgan Pretty b3cad3e709 Added in the new legacy endpoint 2023-06-20 12:31:03 +10:00