Morgan Pretty
8cf2a57fcc
Renamed GRDBStorage to Storage (no use having the prefix anymore since the old DB is deprecated)
2022-07-01 13:08:45 +10:00
Morgan Pretty
eeccfb47d5
Fixed all of the build errors from merge, migrated Call logic, started idBlinding migration and bug fixes
...
Fixed some broken file paths
Fixed a couple of bugs with closed groups
Fixed a few migration issues
Fixed a bug with the ProfilePictureView in open groups (was including the open parenthesis in the initials)
Migrated the Id Blinding changes to work with GRDB
Migrated the call logic to work with GRDB
Updated the code to work the with hard fork changes
2022-06-09 18:37:44 +10:00
Morgan Pretty
290bce5ce0
Merge branch 'feature/session-id-blinding-part-2' into feature/database-refactor
...
# Conflicts:
# Podfile
# Podfile.lock
# Session.xcodeproj/project.pbxproj
# Session/Closed Groups/EditClosedGroupVC.swift
# Session/Closed Groups/NewClosedGroupVC.swift
# Session/Conversations/Context Menu/ContextMenuVC+Action.swift
# Session/Conversations/Context Menu/ContextMenuVC.swift
# Session/Conversations/ConversationMessageMapping.swift
# Session/Conversations/ConversationSearch.swift
# Session/Conversations/ConversationVC+Interaction.swift
# Session/Conversations/ConversationVC.swift
# Session/Conversations/ConversationViewItem.h
# Session/Conversations/ConversationViewItem.m
# Session/Conversations/ConversationViewModel.m
# Session/Conversations/Input View/InputView.swift
# Session/Conversations/Input View/MentionSelectionView.swift
# Session/Conversations/LongTextViewController.swift
# Session/Conversations/Message Cells/Content Views/LinkPreviewView.swift
# Session/Conversations/Message Cells/MessageCell.swift
# Session/Conversations/Message Cells/VisibleMessageCell.swift
# Session/Conversations/Settings/OWSConversationSettingsViewController.m
# Session/Conversations/Views & Modals/ConversationTitleView.swift
# Session/Conversations/Views & Modals/DownloadAttachmentModal.swift
# Session/Conversations/Views & Modals/JoinOpenGroupModal.swift
# Session/Conversations/Views & Modals/LinkPreviewModal.swift
# Session/Conversations/Views & Modals/MessagesTableView.swift
# Session/Conversations/Views & Modals/URLModal.swift
# Session/Home/GlobalSearch/GlobalSearchViewController.swift
# Session/Home/HomeVC.swift
# Session/Home/Message Requests/MessageRequestsViewController.swift
# Session/Media Viewing & Editing/MediaDetailViewController.m
# Session/Media Viewing & Editing/MediaPageViewController.swift
# Session/Meta/AppDelegate.m
# Session/Meta/AppDelegate.swift
# Session/Meta/AppEnvironment.swift
# Session/Meta/Signal-Bridging-Header.h
# Session/Meta/Translations/en.lproj/Localizable.strings
# Session/Meta/Translations/hi.lproj/Localizable.strings
# Session/Meta/Translations/si.lproj/Localizable.strings
# Session/Meta/Translations/zh-Hant.lproj/Localizable.strings
# Session/Notifications/AppNotifications.swift
# Session/Open Groups/JoinOpenGroupVC.swift
# Session/Settings/NukeDataModal.swift
# Session/Settings/SeedModal.swift
# Session/Settings/SettingsVC.swift
# Session/Settings/ShareLogsModal.swift
# Session/Shared/ConversationCell.swift
# Session/Shared/UserSelectionVC.swift
# Session/Utilities/BackgroundPoller.swift
# Session/Utilities/MentionUtilities.swift
# Session/Utilities/MockDataGenerator.swift
# SessionMessagingKit/Database/OWSPrimaryStorage.m
# SessionMessagingKit/Database/SSKPreferences.swift
# SessionMessagingKit/Database/Storage+Contacts.swift
# SessionMessagingKit/Database/Storage+Jobs.swift
# SessionMessagingKit/Database/Storage+Messaging.swift
# SessionMessagingKit/Database/Storage+OpenGroups.swift
# SessionMessagingKit/Database/TSDatabaseView.m
# SessionMessagingKit/File Server/FileServerAPIV2.swift
# SessionMessagingKit/Jobs/AttachmentDownloadJob.swift
# SessionMessagingKit/Jobs/AttachmentUploadJob.swift
# SessionMessagingKit/Jobs/JobQueue.swift
# SessionMessagingKit/Jobs/MessageReceiveJob.swift
# SessionMessagingKit/Jobs/MessageSendJob.swift
# SessionMessagingKit/Jobs/NotifyPNServerJob.swift
# SessionMessagingKit/Messages/Control Messages/ClosedGroupControlMessage.swift
# SessionMessagingKit/Messages/Control Messages/ConfigurationMessage+Convenience.swift
# SessionMessagingKit/Messages/Message+Destination.swift
# SessionMessagingKit/Messages/Signal/TSIncomingMessage.h
# SessionMessagingKit/Messages/Signal/TSIncomingMessage.m
# SessionMessagingKit/Messages/Signal/TSInfoMessage.h
# SessionMessagingKit/Messages/Signal/TSInfoMessage.m
# SessionMessagingKit/Messages/Signal/TSInteraction.h
# SessionMessagingKit/Messages/Signal/TSInteraction.m
# SessionMessagingKit/Messages/Signal/TSMessage.h
# SessionMessagingKit/Messages/Signal/TSMessage.m
# SessionMessagingKit/Open Groups/OpenGroupAPIV2+ObjC.swift
# SessionMessagingKit/Open Groups/OpenGroupAPIV2.swift
# SessionMessagingKit/Open Groups/OpenGroupManagerV2.swift
# SessionMessagingKit/Open Groups/OpenGroupMessageV2.swift
# SessionMessagingKit/Sending & Receiving/Mentions/MentionsManager.swift
# SessionMessagingKit/Sending & Receiving/MessageReceiver+Decryption.swift
# SessionMessagingKit/Sending & Receiving/MessageReceiver+Handling.swift
# SessionMessagingKit/Sending & Receiving/MessageReceiver.swift
# SessionMessagingKit/Sending & Receiving/MessageSender+ClosedGroups.swift
# SessionMessagingKit/Sending & Receiving/MessageSender+Encryption.swift
# SessionMessagingKit/Sending & Receiving/MessageSender.swift
# SessionMessagingKit/Sending & Receiving/Notifications/NotificationsProtocol.h
# SessionMessagingKit/Sending & Receiving/Pollers/ClosedGroupPoller.swift
# SessionMessagingKit/Sending & Receiving/Pollers/OpenGroupPollerV2.swift
# SessionMessagingKit/Sending & Receiving/Pollers/Poller.swift
# SessionMessagingKit/Storage.swift
# SessionMessagingKit/Threads/Notification+Thread.swift
# SessionMessagingKit/Threads/TSContactThread.h
# SessionMessagingKit/Threads/TSContactThread.m
# SessionMessagingKit/Threads/TSGroupModel.h
# SessionMessagingKit/Threads/TSGroupModel.m
# SessionMessagingKit/Threads/TSGroupThread.m
# SessionMessagingKit/Utilities/General.swift
# SessionNotificationServiceExtension/NSENotificationPresenter.swift
# SessionNotificationServiceExtension/NotificationServiceExtension.swift
# SessionSnodeKit/OnionRequestAPI+Encryption.swift
# SessionSnodeKit/OnionRequestAPI.swift
# SessionSnodeKit/SnodeAPI.swift
# SessionSnodeKit/SnodeMessage.swift
# SessionSnodeKit/Storage+SnodeAPI.swift
# SessionSnodeKit/Storage.swift
# SessionUtilitiesKit/General/Array+Utilities.swift
# SessionUtilitiesKit/General/Dictionary+Utilities.swift
# SessionUtilitiesKit/General/SNUserDefaults.swift
# SessionUtilitiesKit/General/Set+Utilities.swift
# SessionUtilitiesKit/Meta/SessionUtilitiesKit.h
# SessionUtilitiesKit/Utilities/Optional+Utilities.swift
# SessionUtilitiesKit/Utilities/Sodium+Conversion.swift
# SignalUtilitiesKit/Configuration.swift
# SignalUtilitiesKit/Database/Migrations/OpenGroupServerIdLookupMigration.swift
# SignalUtilitiesKit/Messaging/FullTextSearcher.swift
# SignalUtilitiesKit/Messaging/Sending & Receiving/MessageSender+Convenience.swift
# SignalUtilitiesKit/Profile Pictures/Identicon+ObjC.swift
# SignalUtilitiesKit/To Do/OWSProfileManager.m
# SignalUtilitiesKit/Utilities/NoopNotificationsManager.swift
# SignalUtilitiesKit/Utilities/UIView+OWS.swift
2022-06-08 14:29:51 +10:00
Morgan Pretty
07d1d8acee
Merge branch 'dev' into feature/session-id-blinding-part-2
...
# Conflicts:
# Podfile
# Podfile.lock
# Session/Calls/Views & Modals/CallVideoView.swift
# Session/Utilities/BackgroundPoller.swift
# SessionSnodeKit/SnodeAPI.swift
2022-06-02 15:41:28 +10:00
Morgan Pretty
9216506847
Merge branch 'dev' into feature/session-id-blinding-part-2
...
# Conflicts:
# Session/Calls/Views & Modals/CallVideoView.swift
# Session/Meta/Translations/de.lproj/Localizable.strings
# Session/Meta/Translations/es.lproj/Localizable.strings
# Session/Meta/Translations/fi.lproj/Localizable.strings
# Session/Meta/Translations/fr.lproj/Localizable.strings
# Session/Meta/Translations/hr.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/zh-Hant.lproj/Localizable.strings
# Session/Meta/Translations/zh_CN.lproj/Localizable.strings
# Session/Utilities/BackgroundPoller.swift
# SessionSnodeKit/OnionRequestAPI.swift
# SessionSnodeKit/SnodeAPI.swift
2022-06-02 14:41:08 +10:00
Morgan Pretty
3514ed4f50
Updated the JobRunner to have multiple job queues (needs more testing)
...
Added a backoff to the Poller retry
Updated the "blocking" behaviour of the JobRunner
Tweaked the Job dependency handling to better handle orphaned dependencies
Fixed an issue where the Conversation screen wasn't observing database changes
2022-05-28 17:25:38 +10:00
Ryan Zhao
987db2f7ab
fix an edge case which may cause old messages coming back
2022-05-26 13:43:44 +10:00
ryanzhao
b54de30d5c
potentially fix path rebuilding issue
2022-05-25 11:04:54 +10:00
ryanzhao
ecb9140969
send closed group message to default namespace as well during hardfork 19.0
2022-05-13 15:28:17 +10:00
ryanzhao
a337123cbb
only update the harkfork version when it is increasing
2022-05-10 14:25:14 +10:00
Morgan Pretty
b541666ef0
Got the ability to send message working again and other tweaks
...
Tested and fixed a couple of issues with the disappearingMessages job
Added a simple dependency system for jobs (primarily for the AttachmentUploadJob, but will likely be others later)
Setup the AttachmentUploadJob again (looks like there are cases which use it)
Prevented a possible infinite job deferral loop from causing the app to crash (the loop is still technically possible but the app will continue to run now)
Updated the interactions unique constraints based on testing and discussions around how the serverHash works
Deleted the legacy ReadReceipt handling (now managed via the 'interaction.wasRead' flag and 'SendReadReceiptsJob')
Deleted the unused SSKIncrementingIdFinder
2022-05-06 12:44:26 +10:00
ryanzhao
dac3f10dd1
tweaks on closed group polling logic
2022-05-06 10:37:53 +10:00
ryanzhao
b8ec4a8c7a
exclude namespace in parameters if polling for 0 with no authentication
2022-05-06 09:18:13 +10:00
ryanzhao
782d51c1d6
minor change on hardfork version check
2022-05-04 16:43:22 +10:00
ryanzhao
372e87e70f
minor fix
2022-05-04 16:36:15 +10:00
ryanzhao
7cc887267f
fix retrieve from default inbox
2022-05-04 16:12:45 +10:00
ryanzhao
e540497724
update last hash persistence
2022-05-04 11:47:09 +10:00
ryanzhao
4224a1fa3c
tweaks for sending message to snode
2022-05-04 10:34:35 +10:00
ryanzhao
15b954dbd6
persist hardfork info
2022-05-04 10:14:15 +10:00
ryanzhao
38523230cb
update namespace
2022-05-03 09:18:53 +10:00
Ryan Zhao
9c535dcb1b
update namespace number
2022-05-02 16:54:36 +10:00
Ryan Zhao
034f2ecc22
send messages with authentication
2022-05-02 13:51:50 +10:00
Ryan Zhao
0b0f0a3787
retrieve messages authenticated for 1-1 chats
2022-05-02 11:35:48 +10:00
Morgan Pretty
3baeb981d9
Further work on the JobRunner
...
Moved the JobRunner into SessionUtilitiesKit so it can be used by SessionSnodeKit
Exposed a 'sharedLokiProject' value on UserDefaults to remove the hard-coded group name used everywhere
Added "blocking" job support for 'OnLaunch' and 'OnActive' jobs to the JobRunner (will retry until it succeeds)
Added the UpdateProfilePicture and RetrieveDefaultOpenGroupRooms jobs
2022-04-27 10:48:54 +10:00
Morgan Pretty
11231599db
Further work on migrations and message pipeline refactoring
...
Refactored the AppDelegate from Objective C to Swift
Updated the HomeVC to use GRDB
Refactored a number of the Job types to be driven via GRDB and the new JobRunner
Fixed a bug where the LinkPreviewView wouldn't render correctly in dark mode
2022-04-21 16:42:35 +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
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
Morgan Pretty
5ca227434b
Merge branch 'dev' into feature/session-id-blinding-part-2
...
# Conflicts:
# Session.xcodeproj/project.pbxproj
# Session/Utilities/BackgroundPoller.swift
# SessionMessagingKit/Database/Storage+OpenGroups.swift
# SessionMessagingKit/Messages/Control Messages/ConfigurationMessage+Convenience.swift
# SessionMessagingKit/Open Groups/OpenGroupAPIV2.swift
# SessionMessagingKit/Open Groups/OpenGroupManagerV2.swift
# SessionMessagingKit/Sending & Receiving/MessageSender.swift
# SessionMessagingKit/Sending & Receiving/Pollers/OpenGroupPollerV2.swift
# SessionMessagingKit/Sending & Receiving/Pollers/Poller.swift
# SessionMessagingKit/Storage.swift
# SessionMessagingKit/Utilities/General.swift
# SessionSnodeKit/SnodeAPI.swift
# SessionUtilitiesKit/General/Atomic.swift
2022-03-29 09:15:32 +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
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
cc2a077a6c
Started working on `MessageRequestResponse` handling for SOGS message requests
...
Pointing Curve25519 to use a fork that exposes an XEd25519 conversion method
Fixed an issue where I had broken all message sending due to the SnodeAPI casting Onion responses to `Any`
2022-02-25 17:48:09 +11:00
Morgan Pretty
eb927c36a9
Started cleaning up some of the SOGS and Onion Requests structure
...
Cleaned up the OnionRequestAPI so we don't need the LegacyOnionRequestAPI
Added requests for the user endpoints
Added deprecated flags to the legacy endpoints and functions
Added some logic to start handling the new poll (batch) response
Started adding unit tests for the OpenGroupAPI functions
2022-02-15 13:55:59 +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
394b0646a3
Updated the code to support additional session id prefixes
2022-02-08 16:37:01 +11:00
Morgan Pretty
03fb5cbeeb
Cleanup and tweaks
...
Fixed some compilation issues.
Removed an unused dependency.
Cleaned up the Podfile to minimise duplication.
Pointed at an oxen fork of SignalCoreKit instead of a personal one.
2022-01-25 12:05:45 +11:00
Ryan Zhao
5f6da0739e
delete message on storage server
2021-08-03 10:26:18 +10:00
Ryan Zhao
e8f0d0d124
WIP: delete from storage server
2021-08-02 17:07:29 +10:00
Ryan Zhao
c68350f3d8
store hash value for outgoing messages
2021-08-02 14:49:34 +10:00
Niels Andriesse
1a237557ff
Add documentation
2021-07-29 10:19:24 +10:00
Niels Andriesse
140f07df96
Disable authenticated retrieval for now
2021-07-27 10:38:58 +10:00
Niels Andriesse
2360af5993
Implement authenticated message retrieval
2021-07-26 09:50:40 +10:00
Niels Andriesse
8a29469eb5
Handle incorrect clock setting
2021-07-23 13:42:13 +10:00
Niels Andriesse
41fe33525c
Don't unnecessarily open sync transactions
2021-07-22 13:07:51 +10:00
Niels Andriesse
498f5a73b0
Don't unnecessarily open sync transactions
2021-07-22 12:59:31 +10:00
Niels Andriesse
ef2eab7e9f
Implement SnodeAPI.clearAllData()
2021-07-12 13:22:35 +10:00
nielsandriesse
1b68c109ee
Fix build
2021-05-12 10:33:02 +10:00
nielsandriesse
5c699d6bb7
Fix inverted operation
2021-05-12 09:23:19 +10:00
nielsandriesse
b694777a71
Fix snode pool updating bug
2021-05-12 09:13:53 +10:00
Niels Andriesse
e93af07b61
Fix ONS
2021-05-03 10:29:08 +10:00