Commit Graph

591 Commits

Author SHA1 Message Date
Ryan ZHAO 6d2e0b457e fix: wrong server removed 2023-12-08 10:28:46 +11:00
Ryan ZHAO e6cf75dd3f remove frigg&fenrir turn servers for now 2023-12-08 10:26:48 +11:00
Morgan Pretty 06f12a58b0 Change the 'Grant Camera Access' copy to 'Continue' at Apple's request
Updated translations again
2023-10-04 10:52:40 +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 cf159bdd77 Added a couple of missing strings 2023-09-22 18:51:26 +10:00
Morgan Pretty 1d0733baa7 Added additional new disappearing messages strings 2023-09-22 16:30:55 +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 20ce1deb23 Merge remote-tracking branch 'upstream/dev' into fix/xcode-15-build-issues 2023-09-22 12:16:02 +10:00
Morgan Pretty 8fee4edf34 Updated to the latest translations from Crowdin 2023-09-22 09:28:51 +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
vlzuykov b9a5e0befb
Add files via upload 2023-09-16 12:45:41 +03: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 f3b2cc577c Fixed the settings bundle and added Cocoapod acknowledgements 2023-08-23 10:30:21 +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
RyanZhao 19beff509b
Merge pull request #864 from f-person/feat/all-orientations-for-ipad
feat: Enable upside down orientation for iPad
2023-07-25 16:54:54 +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 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
Arshak Aghakaryan fbdb1ad690 feat: Enable upside down orientation for iPad
The "upside down" orientation for iPad devices was disabled in
05814add86d765b83c91baa3120ba65569803906b55b159fbd091a95876e40a70d.
However, as an iPad user, not having all orientations is quite
uncomfortable and sometimes annoying. Most apps support all
orientations on iPad nowadays. This commit brings back the upside down
orientation in all places where it was disabled.
2023-07-10 07:17:24 +04:00
Morgan Pretty 0f52d358d4 Fixed an issue where return from background could hang
Stopped trying to run migrations if there aren't any to run (remove unneeded DBWrite thread use)
Shifted return from background migration running to a background thread to prevent hanging
Updated the slow write log to also output once the write completes
2023-07-07 14:55:03 +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 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 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
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 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
2023-06-19 18:19:47 +10:00
Morgan Pretty 6209f2b5c1 Updated LintLocalizableStrings to be a bit more exclusive
Removed a bunch of unused hidden translation files
2023-05-31 16:23:04 +10:00
Morgan Pretty 5d88db7a8a Merge remote-tracking branch 'origin/feature/tweak-profile-modal-ui' into feature/updated-user-config-handling
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Calls/Call Management/SessionCall.swift
#	Session/Conversations/ConversationVC.swift
#	Session/Conversations/Input View/MentionSelectionView.swift
#	Session/Conversations/Message Cells/VisibleMessageCell.swift
#	Session/Settings/SettingsViewModel.swift
#	Session/Shared/Views/SessionAvatarCell.swift
#	Session/Shared/Views/SessionCell+AccessoryView.swift
#	SessionUIKit/Components/ConfirmationModal.swift
#	SessionUIKit/Components/PlaceholderIcon.swift
#	SignalUtilitiesKit/Profile Pictures/ProfilePictureView.swift
2023-05-26 17:54:45 +10:00
Morgan Pretty cf2e198a64 Updated the profile picture modal
Moved the ProfilePictureView into SessionUIKit
Fixed a couple of minor ProfilePictureView bugs
2023-05-24 17:42:43 +10:00
Morgan Pretty 77b6faccb3 Merge remote-tracking branch 'upstream/dev' into feature/job-runner-unit-tests
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	SessionUtilitiesKit/Database/Models/Job.swift
#	SessionUtilitiesKit/Database/Models/JobDependencies.swift
#	SessionUtilitiesKit/JobRunner/JobRunner.swift
2023-05-23 09:52:42 +10:00
Morgan Pretty 3f362a71f3 Fixed a couple of QA issues
Forced the user config feature to be on (for testing)
Fixed a bug where triggering the 'Delete for everyone' functionality would incorrectly try to delete from the recipient swarm (not possible)
Fixed a bug where the 'profileNamePublisher' could only be set once resulting in potential issues if you try to restore different accounts within the same session
Re-added the limit to the number of reactions to display before collapsing to make it consistent with the designs and other platforms
Updated the SnodeAPI to ensure that when it retries it will actually select a new snode
2023-05-23 09:42:10 +10:00
Morgan Pretty 4330a40f6f Started working on integrating the updated push APIs
Updated the PushNotificationAPI to be more consistent with the SnodeAPI and OpenGroupAPI structures
Updated the logic so if the database key can't be retrieved the app will no longer throw a fatalError (now just fail to initialise Storage and rely on the App/Extensions to properly handle this case)
Fixed a couple of bugs where the share extension wouldn't populate correctly
2023-05-19 17:26:14 +10:00
Morgan Pretty 534343f8b0 Merge remote-tracking branch 'upstream/dev' into feature/updated-user-config-handling
# Conflicts:
#	Session/Closed Groups/NewClosedGroupVC.swift
#	Session/Conversations/ConversationVC+Interaction.swift
#	Session/Conversations/ConversationVC.swift
#	Session/Conversations/ConversationViewModel.swift
#	Session/Conversations/Settings/ThreadSettingsViewModel.swift
#	Session/Home/GlobalSearch/GlobalSearchViewController.swift
#	Session/Home/HomeVC.swift
#	Session/Home/New Conversation/NewDMVC.swift
#	Session/Media Viewing & Editing/GIFs/GifPickerViewController.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/Settings/BlockedContactsViewController.swift
#	Session/Settings/NukeDataModal.swift
#	Session/Settings/SettingsViewModel.swift
#	SessionMessagingKit/Shared Models/SessionThreadViewModel.swift
#	SessionUIKit/Components/ConfirmationModal.swift
2023-05-18 17:34:25 +10:00
Morgan Pretty 7ecb645454 Merge remote-tracking branch 'upstream/master' into dev
# Conflicts:
#	Session/Meta/Translations/fr.lproj/Localizable.strings
2023-05-18 15:32:04 +10:00
Morgan Pretty 6be759d39c
Merge pull request #851 from mpretty-cyro/feature/updated-profile-picture-modal
Updated the profile picture management UI & functionality
2023-05-18 15:23:11 +10:00
Morgan Pretty e061bb02cd
Merge pull request #850 from mpretty-cyro/fix/general-bug-fixes
Various tweaks and fixes
2023-05-18 15:19:56 +10:00
Morgan Pretty d19ed8599f Updated the certificate for seed3 2023-05-18 08:50:03 +10:00