Commit graph

15821 commits

Author SHA1 Message Date
Morgan Pretty cf66edb723 Further work on SessionMessagingKit migrations
Added migrations for contacts and started working through thread migration (have contact and closed group threads migrating)
Deprecated usage of ECKeyPair in the migrations (want to be able to remove Curve25519Kit in the future)
2022-04-06 15:43:26 +10:00
Morgan Pretty 0f4df804ed Merge branch 'dev' into feature/database-refactor
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Meta/AppDelegate.m
#	SessionMessagingKit/Utilities/OWSIdentityManager.h
#	SessionMessagingKit/Utilities/OWSIdentityManager.m
#	SignalUtilitiesKit/Database/Storage+Conformances.swift
#	SignalUtilitiesKit/Database/TSStorageHeaders.h
#	SignalUtilitiesKit/To Do/OWSPrimaryStorage+Loki.m
2022-04-04 13:41:16 +10:00
Morgan Pretty 7256cc6871 Merge remote-tracking branch 'upstream/dev' into dev 2022-04-04 13:18:50 +10:00
Morgan Pretty 4ee4b3ffb3 Started adding migration logic for contacts
Updated the getUserHexEncodedPublicKey to take an optional db value so we can retrieve it during the initial migration
2022-04-04 13:18:14 +10:00
RyanZhao cd3c385444
Merge pull request #610 from mpretty-cyro/feature/remove-unused-code
Remove unused code
2022-04-04 10:48:41 +10:00
Morgan Pretty 72eeb1c796 Updated the Identity type to clear everything instead of just the x25519 pair 2022-04-04 09:58:47 +10:00
Morgan Pretty 410f37f0d5 Updated the SnodeSet table name to match the type
Shifted all GRDB Snode convenience methods to be extensions on Snode (instead of SnodeSet) for consistency
2022-04-04 09:52:48 +10:00
Morgan Pretty 63db2a4e3d Updated the 'SwarmSnode' to use the 'port_https' key instead of the 'port' key (deprecated) 2022-04-04 09:33:12 +10:00
Morgan Pretty a1b4554cdb Migrated the SessionSnodeKit from YapDatabase to GRDB
Changed the min OS version to iOS 13.0 (support for 'Identifiable')
Removed the alternate approaches to fetching the userKeyPair and userPublicKeyHexString (no consistently routed through the caching method)
Migrated the 'OWSIdentityManager' logic to use the new 'Identity' type
Added the 'Setting' table and got the pattern working fairly nicely (unfortunately there isn't a good way to avoid key collision without proper enums)
Updated the SessionSnodeKit to migration it's data from YDB to GRDB
Updated the SessionSnodeKit to use GRDB throughout it's logic
2022-04-01 17:22:45 +11:00
Morgan Pretty e65682ae9b Merge branch 'dev' into feature/database-refactor
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Backups/OWSBackup.m
#	Session/Backups/OWSBackupImportJob.m
#	SessionSnodeKit/SnodeAPI.swift
2022-03-31 12:09:04 +11:00
Morgan Pretty 1633105ce2 Merge branch 'dev' into feature/remove-unused-code
# Conflicts:
#	Session/Backups/OWSBackup.m
#	Session/Backups/OWSBackupImportJob.m
#	SignalUtilitiesKit/Sharing/SelectRecipientViewController.m
#	SignalUtilitiesKit/Sharing/SelectThreadViewController.m
2022-03-31 11:51:59 +11:00
Morgan Pretty 459502f1c3 Merge remote-tracking branch 'upstream/dev' into dev 2022-03-31 11:47:52 +11:00
Morgan Pretty 529e416dd1 Started work on GRDB logic and migrations
Setup a migration pattern
Setup the database configuration and security
Started defining the database schema
Started working on the migrations for SessionSnodeKit
2022-03-31 11:47:09 +11:00
RyanZhao 82606a6244
Merge pull request #602 from mpretty-cyro/feature/remove-OWSBlockingManager
Remove the OWSBlockingManager
2022-03-31 10:56:35 +11:00
Morgan Pretty 89e80da625 Removed AppPreferences (unused) 2022-03-30 10:05:47 +11:00
Morgan Pretty f7091dca28 Removed an empty notification observer 2022-03-30 09:48:34 +11:00
Morgan Pretty 0842dbff1e Removed a bunch of unused code
Removed the legacy Theme code (replaced with SessionUIKit equivalents)
Removed the OWSOrphanDataCleaner (unused)
Removed the OWSReceiptType_Delivery from the OWSOutgoingReceiptManager (unused)
Removed the TSStorageKeys and TSStorageHeaders files (unused)
Removed the LKMessageIDCollection (unused - only had methods for deleting data from the collection)
Removed the OWSPrimaryStorageTrustedKeysCollection and OWSIdentityManager_QueuedVerificationStateSyncMessages (unused)
Removed collections and notifications from OWSProfileManager (unused)
2022-03-30 09:46:08 +11:00
Morgan Pretty 9e3c02f79b Removed the unused legacy OWSBackup code 2022-03-30 09:05:07 +11:00
Morgan Pretty 0e09d4b935 Merge remote-tracking branch 'upstream/dev' into dev 2022-03-30 09:04:12 +11:00
ryanzhao 548aad69a9 update build number 2022-03-29 15:39:09 +11:00
RyanZhao b281ea528a
Merge pull request #609 from RyanRory/fix-message-requests-reverse
Fix approved chats back to message requests inbox
2022-03-29 15:37:56 +11:00
ryanzhao 801f0d68a8 fix an edge case where a config message might get isApproved set to false 2022-03-29 13:51:34 +11:00
Morgan Pretty 21924ee81a Merge branch 'dev' into feature/remove-OWSBlockingManager
# Conflicts:
#	Session.xcodeproj/project.pbxproj
2022-03-29 08:45:48 +11:00
Morgan Pretty 1b5eea7b4f Merge remote-tracking branch 'upstream/dev' into dev 2022-03-29 08:40:49 +11:00
Ryan Zhao 59f112c55f bump up version & build number 2022-03-28 14:45:50 +11:00
RyanZhao 7cd0079b37
Merge pull request #599 from mpretty-cyro/fix/update-last-message-hash-after-registering-jobs
Fix - Update last message hash after registering jobs
2022-03-28 14:06:03 +11:00
RyanZhao 74f1d9a6d4
Merge pull request #596 from mpretty-cyro/feature/improve-open-group-deletion-processing
Performance: Improve open group deletion processing
2022-03-28 14:05:46 +11:00
RyanZhao f05c695756
Merge pull request #588 from mpretty-cyro/fix/message-request-count-bug
Performance: Count unread message requests thread-first rather than unread-message-first
2022-03-28 14:00:41 +11:00
Morgan Pretty 7165b9e4f6 Merge branch 'dev' into feature/remove-OWSBlockingManager
# Conflicts:
#	Session/Conversations/ConversationVC+Interaction.swift
#	Session/Meta/AppDelegate.swift
#	SessionMessagingKit/Messages/Control Messages/ConfigurationMessage+Convenience.swift
#	SessionMessagingKit/Sending & Receiving/MessageReceiver+Handling.swift
2022-03-24 16:51:34 +11:00
Morgan Pretty 2530cb4492 Merge remote-tracking branch 'upstream/dev' into dev 2022-03-24 16:38:36 +11:00
RyanZhao 8daf804fd5
Merge pull request #597 from mpretty-cyro/fix/ui-call-running-on-background-thread
Fix for a UI call running on background thread
2022-03-24 16:36:34 +11:00
RyanZhao 7c18609aa8
Merge pull request #601 from mpretty-cyro/fix/double-url-share
Fix double url share
2022-03-24 16:36:20 +11:00
RyanZhao 3e20519a6a
Merge pull request #603 from mpretty-cyro/fix/link-preview-crash
Fix link preview crash
2022-03-24 16:36:10 +11:00
RyanZhao 0f34972134
Merge pull request #604 from mpretty-cyro/fix/tweaks-to-config-message-generation
Tweaks to config message generation
2022-03-24 16:36:00 +11:00
Morgan Pretty 3663e63bc7 Swapped the Config message 'filter' to a 'compactMap' because apparently that doesn't crash 2022-03-24 16:27:56 +11:00
Morgan Pretty e4def22472 Moved the Storage.write call into the self.approveMessageRequestIfNeeded call 2022-03-24 15:46:53 +11:00
Morgan Pretty 212c5e87aa Re-added the transaction requirement when generating the current config message 2022-03-24 15:34:46 +11:00
Morgan Pretty 29c53223e0 More tweaks to fix crash
Wrapped the force sync calls within their own Storage.write blocks to ensure they have the latest data and aren't accessing a transaction completed in a different thread
Reverted a number of the unneeded changes
2022-03-24 15:25:47 +11:00
Morgan Pretty b815a9f348 Fixed up a potential threading issue with the sync configuration logic
Moved all the sync configuration calls to be within the existing 'write' blocks instead of waiting until the completion
2022-03-24 15:08:24 +11:00
Morgan Pretty 1214005c59 Updated the cachedEncodedPublicKey to be Atomic
Added the Atomic wrapper for thread safe variables
2022-03-24 14:42:25 +11:00
Morgan Pretty 1a6c34e3b8 Removed the unused legacy OWSBackup code 2022-03-24 14:35:23 +11:00
Morgan Pretty f8dfbd4244 Reverting change and fixing a force-cast crash 2022-03-24 14:23:47 +11:00
Morgan Pretty 6205e72eab Change to make the 'getUser(using:)' method more consistent 2022-03-24 14:16:38 +11:00
Morgan Pretty 7aa1221987 Tweaks to the ConfigurationMessage generation logic
Removed force unwraps
Updated the closed group storage methods to take a transaction parameter
2022-03-24 14:13:35 +11:00
Morgan Pretty 990edd20df Swapped a force-unwrap to an optional unwrap 2022-03-24 13:42:49 +11:00
Morgan Pretty 5bb3bd7bc1 Cleaned up some config sync logic and allowed migrations to trigger them
Updated the migrations so they can specify whether a configuration sync is required
Moved the config sync logic into a MessageSender extension (makes far more sense than AppDelegate)
Fixed a bug where the ShareVC was triggering the 'versionMigrationsDidComplete' twice
Removed a couple of imports for files that had been deleted
2022-03-24 10:03:51 +11:00
Morgan Pretty b1cfa4f50a Updated the Podfile to include the needed libraries 2022-03-23 14:55:02 +11:00
Morgan Pretty e7e8aba69a Fixed a bug where sharing a url with LinkPreviews disabled could result in it being duplicated in the message 2022-03-23 10:00:49 +11:00
Morgan Pretty 78c0d000be Removed the OWSBlockingManager replacing it with the config sync
Fixed an issue where the "block" button would appear in the NoteToSelf swipe menu
Removed the OWSBlockingManager and supporting files
Removed a number of unused classes and methods
Refactored the BlockListUIUtils to Swift
2022-03-23 09:59:38 +11:00
Morgan Pretty b90904ebbd Updated the code to only update the last message hash once the MessageReceiveJobs have been created 2022-03-22 14:09:47 +11:00