Commit Graph

1328 Commits

Author SHA1 Message Date
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 638685a8cc
Merge pull request #925 from mpretty-cyro/fix/blank-display-name-handling
Fixed a bug where profiles with blank name values wouldn't fallback correctly
2023-10-12 16:15:36 +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 819106b0f2 Fixed a bug where profiles with blank name values wouldn't fallback correctly 2023-10-05 11:58:56 +11:00
Morgan Pretty 9dd2e896bb Merge remote-tracking branch 'upstream/dev' into fix/add-migration-tests
# Conflicts:
#	SessionMessagingKit/SessionUtil/SessionUtil.swift
2023-10-03 12:53:35 +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 f9dc85b7ab Fixed a couple of onboarding bugs and tweaks some logs
Fixed an issue where starting and then restarting onboarding would get the app into an invalid state
Fixed an issue where newline characters could cause issues with parsing the recovery phrase
Added additional logs to better be able to understand the database state
2023-10-02 12:59:52 +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 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 20ce1deb23 Merge remote-tracking branch 'upstream/dev' into fix/xcode-15-build-issues 2023-09-22 12:16:02 +10:00
Morgan Pretty 323a7a1bce
Merge pull request #906 from mpretty-cyro/feature/add-timestamps-to-notification-metadata
Added additional notification metadata and rate-limited PN subscriptions
2023-09-22 11:33:57 +10:00
Morgan Pretty 52836cff91 Fixed a couple more issues
Fixed an issue with the Emoji generation
Fixed the SessionThread 'isPinned' property
Fixed an issue when migrating from a pre 2.3.0 version to the latest version
2023-09-21 15:55:26 +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 f92579db07 Fixed a couple more bugs with link previews
Fixed an issue where sending a link with a preview wouldn't work if you have a previous "failed" preview for the same link
Fixed an issue where receiving a link with a preview could update all existing previews to an invalid state
2023-09-19 15:40:58 +10:00
Morgan Pretty 8b1a4aaba0 Added additional notification metadata and rate-limited PN subscriptions
Fixed an issue where the PN subscription API call wasn't taking the frequency rate limit into account
Added the timestamp and expiration timestamp to the notification metadata
2023-09-19 10:15:57 +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 dc15586dd1 Fixed a few silly build issues 2023-09-04 11:20:15 +10:00
Morgan Pretty 7a8941db5c Fixed a couple of config handling bugs
Fixed an bug where config messages could be processed in the wrong order
Tweaked the behaviour or removing threads (this would cause issues with future config-based settings changes that live on the thread getting lost)
2023-09-01 16:16:13 +10:00
Morgan Pretty dfdf843f66 Fixed a few more issues
Fixed an issue where tapping a remote notification wasn't opening the conversation
Fixed an issue where the Share Extension could fail due to not having a snode pool loaded
Fixed an issue where the Theme may not be applied at the right time in the Share extension
2023-08-21 16:13:17 +10:00
Morgan Pretty 8e28726fa7 Fixed a bug where unwritable conversations appeared in the share extension 2023-08-17 18:06:06 +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 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 66b94778e0 Fixed the build issues and a bug where a new legacy group wasn't subscribile 2023-08-01 16:30:34 +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 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 bc5d8d0931 Cleaning up final things before release
Added basic support for the '25' blinded prefix
Fixed a unit test CI issue
2023-07-14 14:36:59 +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 b72bf42605 Updated the CI and fixed a couple of config bugs
Updated to the 1.0.0 release of libSession
Set the User Config feature flag to July 31st 10am AEST
Shifted quote thumbnail generation out of the DBWrite thread
Stopped the CurrentUserPoller from polling the user config namespaces if the feature flag is off
Fixed an issue where the scrollToBottom behaviour could be a little buggy when an optimistic update is replaced with the proper change
Fixed an issue where the 'attachmentsNotUploaded' error wouldn't result in a message entering an error state
Fixed a bug where sync messages with attachments weren't being sent
2023-07-13 14:47:10 +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 a5306f85b7 Added in a little defensive coding for config message processing
Updated the config 'pendingChanges' to use the readonly version of the conf (no use blocking access)
Added code to throw and log when the config processing exceeds 50000 loops (ie. infinite loop protection)
2023-07-07 15:19:13 +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 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 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
2023-06-29 12:11:54 +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 b6328f79b9 Reworked the app startup process
Shifted the initial HomeVC population to a background thread to avoid blocking launch processing
Added some logging for database 'ABORT' errors to better identify cases of deadlocks
Added a launch timeout modal to allow users to share their logs if the startup process happens to hang
Updated the notification handling (and cancelling) so it could run on background threads (seemed to take up a decent chunk of main thread time)
Fixed an issue where the IP2Country population was running sync which could cause a hang on startup
Fixed an issue where the code checking if the UIPasteBoard contained an image was explicitly advised against by the documentation (caused some reported hangs)
Fixed a hang which could be caused by a redundant function when the ImagePickerController appeared
2023-06-27 18:01:00 +10:00