Commit graph

53 commits

Author SHA1 Message Date
Morgan Pretty a26ee12f8d Further work on Id Blinding
Renamed the setter for the SOGS 'Server' object for consistency
Updated the Curve25519Kit repo to use an Oxen fork
Updated the MockDataGenerator to accomodate the latest changes
Updated the ConversationVC to better support getting replaced when the conversion from blinded to unblinded happens while on that screen
Added a cache for the mapping between blinded ids and standard ids (gets cached whenever a valid match is found)
Added a migration to remove the old 'authToken, 'lastMessageServerId' and 'lastDeletionServerId' collections (redundant in SOGS V4)
2022-03-01 14:06:37 +11:00
Morgan Pretty 3e97782d18 Merge branch 'dev' into feature/session-id-blinding-part-2
# Conflicts:
#	Session.xcodeproj/project.pbxproj
#	Session/Conversations/ConversationVC.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
2022-02-28 10:46: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 dbead5e3c8 Got the '/inbox' APIs and encryption/decryption/validation working
Added a few types to make the code more readable
Added the inbox request to the polling
Added a couple of properties to the TSContactThread to indicate the originating open group to support SOGS DMs
Added code to store the latest message id for an open group inbox
Added a bunch of documentation from the API docs into the OpenGroupAPI (and associated models)
Updated the OpenGroupAPI to match the latest docs
Fixed the incorrect structure of the SendDirectMessageRequest
Fixed an incorrect inbox endpoint path
Tweaked the batch response handling so it wouldn't fail to parse all responses if a single one failed
Renamed IdPrefix to SessionId.Prefix and cleaned up the type to be more readable & self-documenting
2022-02-25 11:59:29 +11:00
Morgan Pretty faa8918cd4 Replaced the remaining non-file legacy methods with their non-legacy equivalents
Updated the OpenGroup polling to run on a non-main thread
Updated the TSGroupModel to store moderatorIds as well as the adminIds (new endpoint is only going to give diffs)
Updated the BatchRequest to support json, base64 encoded strings and raw bytes for it's body
Replaced the 'lastMessageServerID' methods with 'OpenGroupSequenceNumber' methods (since we have swapped the property over)
Added an alert when banning fails (previously it would fail silently)
Fixed a bug where sent blinded messages were appearing as incoming messages
Fixed a bug where the OpenGroup infoUpdates wasn't getting decoded correctly
Fixed an issue where the ConversationVC wouldn't become the first responder again after the ban alerts disappeared
Fixed an issue where I'd incorrectly used the message 'seqNo' in place of the message server id
Fixed an issue where open group messages were setting their `sentTimestamp` to seconds instead of milliseconds for incoming messages
2022-02-24 10:39:22 +11:00
Morgan Pretty 4c89c165d8 Fixed a few bugs uncovered by QA
Fixed a bug where the ConfigurationMessage was getting generated before the contact state was persisted to the database in the message request flow causing odd behaviours (now generating the ConfigurationMessage within the same transaction)
Fixed a bug where sending a message to an existing message request thread once the message requests item has been hidden would show the message requests notification and trigger the section to re-appear on the home screen
Fixed a bug where blocked contacts weren't getting excluded from the contacts list in the configuration message
2022-02-23 17:12:57 +11:00
Morgan Pretty ef09d4d5aa Additional encryption work on id blinding
Got the updated blinding logic working (at least when authenticating a request - still need to deal with message signing and verification)
Storing the server capabilities in the database now so we can correctly blind requests based on them
Renamed the remaining 'v2' functions and classes to just be 'OpenGroup' since there isn't a 'V2' anymore
Cleaned up a few TODOs and functions
2022-02-17 18:33:23 +11:00
Morgan Pretty b655882cbd Started resolving TODOs
Added some new properties to the OpenGroupV2
Moved a number of methods and variables from OpenGroupAPI to OpenGroupManager (anything doing actual logic)
Moved the message signing into the OpenGroupAPI (since that's the only place it happens)
Renamed remaining old model classes to start with 'Legacy' to make clean up easier
Updated the OpenGroupAPI poll method to use the same logic as it previously did to determine if it should retrieve recent messages or messages since the last one
2022-02-16 10:31:08 +11:00
Morgan Pretty 4963a84ddd Added more unit tests for the OpenGroupAPI (fixed a couple bugs as well) 2022-02-15 16:00:51 +11:00
Niels Andriesse 519ffa4405 Fully switch to the new contact API
This should improve performance significantly as it avoids many unnecessary sync transactions. It also makes the code more readable.
2021-07-22 14:41:27 +10:00
nielsandriesse 06f795169b Merge branch 'dev' into cleanup 2021-05-05 14:10:19 +10:00
nielsandriesse 964cb8b326 Fix new deletion method 2021-05-05 13:49:24 +10:00
Niels Andriesse d742fc1548 Delete V1 OGS & file server 2021-05-04 15:46:48 +10:00
Niels Andriesse beabf0c9c0 Implement closed group logic changes 2021-04-16 10:56:10 +10:00
Niels Andriesse 5504f74659 Show V2 open group member count 2021-03-26 16:31:15 +11:00
nielsandriesse 4c9728b4fe Update other APIs for V2 open groups 2021-03-24 12:37:33 +11:00
nielsandriesse a5f831fd6c Keep track of last message & last deletion server IDs 2021-03-24 12:07:02 +11:00
nielsandriesse 1d65f717b5 Add auth token handling 2021-03-24 11:12:08 +11:00
Niels Andriesse dd0baf0d97 Unify contacts APIs 2021-03-01 09:36:18 +11:00
Niels Andriesse 10e6d114a0 Sync profile updates 2021-02-23 16:01:06 +11:00
Niels Andriesse 90e53e5cef Redesign conversation screen part 1 2021-02-09 15:14:18 +11:00
Niels Andriesse 867e9114a6
Merge branch 'dev' into multi-device 2021-01-22 13:29:13 +11:00
Niels Andriesse 3e5baca72d Fix open group message deletion 2021-01-21 11:27:52 +11:00
nielsandriesse e38dae5a05 Replace PublicChatManager 2021-01-14 09:42:52 +11:00
nielsandriesse d6314c8d30 Handle configuration messages 2021-01-13 13:38:07 +11:00
Niels Andriesse 71758b0c00 Remove the Signal protocol 2021-01-04 13:59:21 +11:00
Niels Andriesse 2a4977d269 Implement Session protocol 2020-12-14 09:49:02 +11:00
Niels Andriesse efe8f1c8bb Clean 2020-12-07 16:00:21 +11:00
Niels Andriesse 2d8933901d Fix open group display name handling 2020-11-30 15:44:07 +11:00
Niels Andriesse b621bdc69a Partially fix open groups 2020-11-30 11:00:28 +11:00
nielsandriesse d39e155e1c Make link previews work again 2020-11-28 11:48:08 +11:00
nielsandriesse 20faa8e914 Debug 2020-11-27 16:22:15 +11:00
nielsandriesse addc859c84 Fix duplicate messages & debug 2020-11-27 15:13:42 +11:00
nielsandriesse c59fe05f8e Cancel message send job(s) if associated message/thread is deleted 2020-11-27 10:08:46 +11:00
nielsandriesse 77c1f721b9 Further debug attachment sending 2020-11-27 09:07:24 +11:00
Niels Andriesse 341782f255 Fix profile handling 2020-11-26 15:16:35 +11:00
Niels Andriesse 3b252056de Implement attachment uploading 2020-11-23 15:37:25 +11:00
Niels Andriesse d2e8f2142e WIP 2020-11-23 15:08:01 +11:00
Niels Andriesse d7c71a8c06 Make things compile again 2020-11-23 10:24:40 +11:00
nielsandriesse 961878f74c Parse attachment pointers 2020-11-20 11:10:53 +11:00
nielsandriesse 58802936c1 Finish message receiving pipeline 2020-11-19 09:44:00 +11:00
nielsandriesse 97545de75e Handle expiration timer updates 2020-11-18 15:36:51 +11:00
nielsandriesse 7e9eb2f138 Make typing indicators work & implement job resuming 2020-11-18 14:27:30 +11:00
Niels Andriesse b030b5999b Make messages show up again 2020-11-18 12:02:38 +11:00
nielsandriesse b88bfd1da0 Configure SessionMessagingKit 2020-11-13 08:41:54 +11:00
nielsandriesse 82127bfe4d Clean 2020-11-10 15:48:47 +11:00
nielsandriesse 362e2e9c03 Update SessionMessagingKit for open groups 2020-11-09 11:53:07 +11:00
nielsandriesse a9755631e3 Re-implement Signal protocol encryption 2020-11-09 10:08:57 +11:00
nielsandriesse 71d51a873a Further implement JobQueue 2020-11-08 13:54:40 +11:00
nielsandriesse d80804ca5a Create JobQueue 2020-11-08 13:12:38 +11:00