Commit Graph

36 Commits

Author SHA1 Message Date
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 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 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 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 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 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 fa39b5f61c Merge remote-tracking branch 'upstream/dev' into feature/updated-user-config-handling
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Calls/CallVC.swift
#	Session/Conversations/Message Cells/Content Views/DocumentView.swift
#	Session/Conversations/Settings/OWSMessageTimerView.m
#	SessionMessagingKit/File Server/FileServerAPI.swift
#	SessionMessagingKit/Messages/Visible Messages/VisibleMessage.swift
#	SessionMessagingKit/Open Groups/OpenGroupManager.swift
#	SessionMessagingKit/Sending & Receiving/MessageReceiver.swift
#	SessionMessagingKit/Shared Models/MessageViewModel.swift
#	SessionMessagingKit/Shared Models/SessionThreadViewModel.swift
#	SessionSnodeKit/SnodeAPI.swift
#	SessionUtilitiesKit/Networking/HTTP.swift
#	SignalUtilitiesKit/Media Viewing & Editing/Attachment Approval/AttachmentTextToolbar.swift
2023-04-13 13:22:39 +10:00
Morgan Pretty 2a693df4c1 Updated the seed node certificates and removed the workaround 2023-04-13 09:41:26 +10:00
Morgan Pretty b270133f68 Fixed a couple of issues with seed node requests
Updated the seed node certificates to use the new 10 year ones
Fixed an issue where multiple seed node requests could be triggered at once
Increased the version & build numbers
2023-04-11 13:10:11 +10:00
Morgan Pretty f4d6babca2 Merge remote-tracking branch 'upstream/dev' into feature/updated-user-config-handling
# Conflicts:
#	Podfile.lock
#	Session.xcodeproj/project.pbxproj
#	Session/Closed Groups/EditClosedGroupVC.swift
#	Session/Conversations/Settings/ThreadSettingsViewModel.swift
#	Session/Home/HomeVC.swift
#	Session/Home/HomeViewModel.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/Shared/FullConversationCell.swift
#	SessionMessagingKit/Configuration.swift
#	SessionMessagingKit/Database/Models/SessionThread.swift
#	SessionMessagingKit/Sending & Receiving/Message Handling/MessageSender+ClosedGroups.swift
#	SessionMessagingKit/Shared Models/SessionThreadViewModel.swift
#	SessionUIKit/Utilities/UIContextualAction+Theming.swift
#	SessionUtilitiesKit/Database/Models/Job.swift
#	SessionUtilitiesKit/General/Dictionary+Utilities.swift
#	SessionUtilitiesKit/JobRunner/JobRunner.swift
2023-04-06 18:09:26 +10:00
Morgan Pretty 81b63075cb Updated the seed node certificate validation to use a specific date 2023-04-05 15:07:45 +10:00
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
2023-02-20 12:56:48 +11:00
Morgan Pretty 0abb09c0cf Fixed a few small issues found when testing
Fixed a couple of issues with the ConfigurationSyncJob logic
Moved the proto parsing out of the MessageReceiveJob write block (to reduce time blocking writes)
Removed difficulty from the SendMessageResponse (deprecated and removed)
2023-01-18 10:56:18 +11:00
Morgan Pretty 8f3dcbc6be Sorted out a bunch of the config syncing logic
Updated the onboarding to attempt to retrieve the current user profile config and skip display name collection if it already exists
Updated the logic to get the snode pool and build paths immediately on launch even if the user hasn't been created yet (faster onboarding)
Removed the iOS-specific concurrent dual snode '/store' behaviour
Cleaned up the profile updating logic
Fixed an issue where the pollers could end up deadlocking the main thread if too many tried to start concurrently
2022-12-16 16:51:08 +11:00
Morgan Pretty f1e9412c7a Added in missing code changes unrelated to closed groups rebuild 2022-12-08 14:21:38 +11:00
Morgan Pretty 5033738994 Fixed a few issues caused by the PromiseKit refactor
Started cleaning up the TODOs
Fixed a couple of merge conflict issues
Fixed a bug with the state of attachments which failed to download

# Conflicts:
#	SessionMessagingKit/Database/Models/Attachment.swift
2022-12-07 15:59:17 +11:00
Morgan Pretty 6970ff22cc Refactored the remaining references to PromiseKit
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Media Viewing & Editing/PhotoCapture.swift
#	SessionMessagingKit/Jobs/Types/GarbageCollectionJob.swift
#	SessionMessagingKit/Sending & Receiving/MessageSender+Convenience.swift
#	SessionMessagingKit/Utilities/Promise+Utilities.swift
#	SessionShareExtension/ShareVC.swift
#	SessionShareExtension/ThreadPickerVC.swift
#	SessionSnodeKit/OnionRequestAPI+Encryption.swift
#	SessionSnodeKit/OnionRequestAPI.swift
#	SessionUtilitiesKit/Database/Storage.swift
#	SessionUtilitiesKit/Networking/HTTP.swift
2022-12-07 15:58:53 +11:00
Morgan Pretty 8ac6b25ced Further refactoring work
Refactored usages and removed AFNetworking
Updated the media screens to use Combine

# Conflicts:
#	Session/Closed Groups/GroupMembersViewModel.swift
#	Session/Media Viewing & Editing/GIFs/GifPickerCell.swift
#	Session/Media Viewing & Editing/GIFs/GiphyAPI.swift
#	Session/Media Viewing & Editing/PhotoCapture.swift
2022-12-07 15:54:17 +11:00
Morgan Pretty c9fdee9f24 Work on the PromiseKit refactor
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Conversations/ConversationVC+Interaction.swift
#	Session/Home/Message Requests/MessageRequestsViewModel.swift
#	Session/Notifications/AppNotifications.swift
#	Session/Notifications/PushRegistrationManager.swift
#	Session/Notifications/SyncPushTokensJob.swift
#	Session/Notifications/UserNotificationsAdaptee.swift
#	Session/Settings/BlockedContactsViewModel.swift
#	Session/Settings/NukeDataModal.swift
#	Session/Settings/SettingsViewModel.swift
#	Session/Utilities/BackgroundPoller.swift
#	SessionMessagingKit/Database/Models/ClosedGroup.swift
#	SessionMessagingKit/File Server/FileServerAPI.swift
#	SessionMessagingKit/Open Groups/OpenGroupAPI.swift
#	SessionMessagingKit/Sending & Receiving/Message Handling/MessageReceiver+ClosedGroups.swift
#	SessionMessagingKit/Sending & Receiving/Message Handling/MessageReceiver+UnsendRequests.swift
#	SessionMessagingKit/Sending & Receiving/Message Handling/MessageSender+ClosedGroups.swift
#	SessionMessagingKit/Sending & Receiving/MessageSender+Convenience.swift
#	SessionMessagingKit/Sending & Receiving/MessageSender.swift
#	SessionMessagingKit/Sending & Receiving/Notifications/PushNotificationAPI.swift
#	SessionMessagingKit/Sending & Receiving/Pollers/ClosedGroupPoller.swift
#	SessionMessagingKit/Sending & Receiving/Pollers/CurrentUserPoller.swift
#	SessionMessagingKit/Sending & Receiving/Pollers/Poller.swift
#	SessionMessagingKit/Utilities/ProfileManager.swift
#	SessionSnodeKit/Networking/SnodeAPI.swift
#	SessionSnodeKit/OnionRequestAPI.swift
#	SessionUtilitiesKit/Networking/HTTP.swift
2022-12-07 15:50:58 +11:00
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
2022-12-07 14:40:03 +11:00
Morgan Pretty aed1b73185 Fixed a few additional issues uncovered
Added a explicit "timeout" error to make debugging a little easier
Added code to prevent the AttachmentUploadJob from continuing to try to upload if it's associated interaction has been deleted
Updated the getDefaultRoomsIfNeeded to make an unauthenticated sequence all to get both capabilities and rooms (so we will know if the server is blinded and retrieve the room images using blinded auth)
Fixed a bug where the notification badge wouldn't get cleared when removing data from a device
Fixed a bug where adding an open group could start with an invalid 'infoUpdates' value resulting in invalid data getting retrieved
Fixed a bug where under certain circumstances the PagedDatabaseObserver was filtering out updates (noticeable when restoring a device, would happen if the currentCount of content was smaller than the pageSize)
2022-07-26 11:36:32 +10:00
Morgan Pretty 1c474955de File upload working, further code cleanup
Got the updated file upload working
Removed the legacy 'room' header
Consolidated a number of types between SOGS, FileServer and general requests
Updated the OnionRequestAPI to deal with a Data payload (rather than encoding it to a string and then back to data)
2022-03-04 13:33:06 +11:00
Morgan Pretty 6936f35f2a Fixed a few issues uncovered while testing and some cleanup
Fixed an incorrect optional in RoomPollInfo
Fixed an incorrect parameter name in the ClosedGroupRequestBody
Fixed a crash due to a change in the ContactUtilities
Cleaned up the duplicate code in the OnionRequestAPI, HTTP and SnodeAPI to all use 'Data' response types
Updated the SnodeAPI to casting types to Any (made it hard to catch breaking changes with HTTP and OnionRequestAPI)
2022-03-02 13:09:45 +11:00
Morgan Pretty c90f346d6a Further SOGS V4 integration work
Added in the v4 onion requests logic
Added in the new pin/unpin APIs
Split up additional legacy methods to try and simplify the refactoring
Added a number of TODOs around usage of legacy request methods
2022-02-14 14:07:45 +11:00
Morgan Pretty 4f3900771e More work on getting SOGS V4 integrated
Updated the MessageSendJob to support V4 messages (V2 messages will be upgraded to V4 if they get re-encoded)
Renamed the Message+Destination from 'openGroup' & 'openGroupV2' to 'legacyOpenGroup' and 'openGroup'
Started plugging in more of the V4 APIs
Renamed a number of the V2 APIs to start with 'legacy'
2022-02-11 16:48:16 +11:00
Morgan Pretty 2284375fc0 Started work on updated SOGS support
Split the OpenGroupAPIV2 into separate files
Started working on the new auth and blinded-id approaches (new auth working with un-blinded id suggesting blinded-id code is incorrect)
Updated the SOGS request/response types to use Codable
Updated the SOGS Request type to use enums instead of strings for keys (to reduce likelihood of typos breaking things)
Updated SessionMessagingKit to use Codable and JSONEncoder/JSONDecoder instead of the legacy JSONSerialization
Cleaned up some naming conventions in the SessionMessagingKit (calling a URLRequest body 'parameters' is very confusing...)
Removed the custom TSRequest class (just using standard URLRequest everywhere instead)
Added a number of extension functions to enable some more functional-coding styles
Added extensions to Sodium methods to allow scalar multiplication and the ability to hash providing a salt and a personalisation value (both needed for new SOGS auth)
Fixed an issue where the legacy auth for SOGS could crash due to threading issues (multiple threads accessing the same variable)
Fixed an issue where if you were in two rooms in a single SOGS and deleted one of them, the other room would stop getting updates as the server public key was getting removed
2022-02-10 11:17:41 +11:00
Morgan Pretty dd9eeb5d61 Added initial support for sharing URLs and text
Updated the share extension to load URL previews.
Updated the ThreadPickerVC to send plain text & URLs in the same way they are sent for normal messages.
2022-01-12 09:40:53 +11:00
Niels Andriesse 5202bde4a4 Supply fake User-Agent & Accept-Language headers 2021-07-09 15:07:39 +10:00
nielsandriesse f7a75a1b80 Debug 2021-04-07 11:34:28 +10:00
nielsandriesse 75f5591fe0 Store certificates in DER format 2021-04-07 09:26:27 +10:00
Niels Andriesse 2687d9c968 Use proper API 2021-04-07 09:26:00 +10:00
Niels Andriesse 8d2e81ddde Trust only self-signed seed node certificates 2021-04-01 15:51:14 +11:00
Niels Andriesse 58748471a4 Set up skeleton code 2021-04-01 15:27:44 +11:00
Niels Andriesse be877bbeaf Improve onion request path loading efficiency 2021-01-27 16:14:35 +11:00
Niels Andriesse 6e673945c5 Re-organize files 2020-12-18 15:37:29 +11:00