Commit Graph

170 Commits (d01cda454cc966f41200ea6ed9434ff5ed5ba4eb)

Author SHA1 Message Date
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
3 years ago
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
3 years ago
Morgan Pretty 1edd500dab Updated to the latest blinding behaviour
Added a couple more dependencies for unit testing injection
Updated the MessageSender to set the sender of the message to the appropriate blinded/unblinded key
Updated the OpenGroup Message to handle verification of both blinded and unblinded messages
Updated the MessageSender to use dependency injection for it's sendToOpenGroupDestination method
Updated the JSONDecoder to support getting dependencies (for signature verification)
Fixed tests broken by updating the signing logic
3 years ago
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
3 years ago
Morgan Pretty 63e6cdd9ec Renamed OpenGroupAPIV2 to OpenGroupAPI
Added the inbox endpoints
3 years ago
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
3 years ago
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'
3 years ago
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
3 years ago
ryanzhao c38923cc2f Merge branch 'disappearing-message-fix' into voice-calls-2 3 years ago
ryanzhao e24ae60d71 fix duplicated disappearing message in closed groups 3 years ago
Ryan Zhao 35fc3ede9e Merge branch '1.11.19' into voice-calls-2 3 years ago
Ryan Zhao a6df6504c8 Prevent the same ExpirationTimerUpdate to be handled twice 3 years ago
Ryan Zhao e504e23f92 minor fix 3 years ago
Ryan Zhao 77e1f30bc9 fix sync message sending bug 3 years ago
Ryan Zhao 81dd4557a5 sync answer and end call message 3 years ago
ryanzhao e49431d2eb fix transaction crash 3 years ago
ryanzhao dd891063bd minor fix 3 years ago
ryanzhao 8a6be4fc5b notify pre-offer call message 4 years ago
ryanzhao 132ff0416f set server timestamp as open group message's sent timestamp 4 years ago
ryanzhao 1822c7df16 fix duplicated messages sent in closed groups 4 years ago
Ryan Zhao 6e45aed71b Merge branch 'dev' of https://github.com/oxen-io/session-ios into unsend-message 4 years ago
Niels Andriesse e311d2878f Fix message status indicator bug 4 years ago
Niels Andriesse 50d17be43b Fix animation glitch 4 years ago
Niels Andriesse b8c4e6aa93 Avoid unnecessary conversation screen updates 4 years ago
ryanzhao 9953451767 add comment 4 years ago
ryanzhao 8d53a775d2 Revert "delete real message and sync message together"
This reverts commit cc17a952e0.
4 years ago
ryanzhao cc17a952e0 delete real message and sync message together 4 years ago
Niels Andriesse 7f0b87a2b2 Avoid unnecessary conversation screen updates 4 years ago
Ryan Zhao c68350f3d8 store hash value for outgoing messages 4 years ago
Ryan Zhao b827b9e1ba make it work for multi device 4 years ago
Ryan Zhao 6aa865e7b7 delete locally and send unsend request 4 years ago
Niels Andriesse 8a29469eb5 Handle incorrect clock setting 4 years ago
Niels Andriesse ca862096b4 Rename profilePictureEncryptionKey → profileEncryptionKey 4 years ago
Niels Andriesse aa3a18fa7e Don't notify for closed group control messages
This addresses an issue where:

• someone would create a closed group
• on other peoples' devices this control message would be received through a background poll or a push notification
• the received message timestamps table would be updated
• processing wouldn't be finished (during a background poll or while handling a push notification the system can cut you off at any time)
• some of the added users don't see the new closed group because when they open the app and get the control message from their swarm it's considered a duplicate and isn't processed again
4 years ago
Niels Andriesse 3fda8daec9 Merge branch 'dev' into cleanup 4 years ago
Niels Andriesse bd04775cbf Implement open group invitations UI 4 years ago
nielsandriesse 06f795169b Merge branch 'dev' into cleanup 4 years ago
nielsandriesse 0c864454aa Remove duplicate message server ID tracking 4 years ago
Niels Andriesse d742fc1548 Delete V1 OGS & file server 4 years ago
Niels Andriesse 2763ee0d1a Clean 4 years ago
nielsandriesse a76c43973f Increase TTL & remove PoW 4 years ago
Niels Andriesse 516f815521 Debug 4 years ago
nielsandriesse e5764264b3 Debug 4 years ago
nielsandriesse 09b4b7d388 Update MessageSender for V2 open groups 4 years ago
nielsandriesse 81d091c43f Fail gracefully if the user doesn't have a name set 4 years ago
Niels Andriesse 82690259b2 Clean protobuf 4 years ago
Niels Andriesse dd0baf0d97 Unify contacts APIs 4 years ago
Niels Andriesse 73bbaf9ce7 Potentially fix attachment issue 4 years ago
nielsandriesse 2d6bf235d7 Sync expiration timer updates 4 years ago
nielsandriesse ece564988e Allow self-sending of closed group control messages 4 years ago
nielsandriesse 4803b96eb1 Only handle the first config sync message after restoration 4 years ago
Niels Andriesse 57f7bc88eb Fix leftover merge conflicts 4 years ago
Niels Andriesse 7acb6c9ac3 Merge branch 'dev' into multi-device 4 years ago
Niels Andriesse 804377c5a4 Minor refactoring 4 years ago
Niels Andriesse 585fabca03 Debug 4 years ago
Niels Andriesse 6b7b158000 Debug 4 years ago
Niels Andriesse cf333d5e3d Merge branch 'closed-groups' into multi-device 4 years ago
Niels Andriesse 867e9114a6
Merge branch 'dev' into multi-device 4 years ago
Niels Andriesse c9c83da3dc Rename ClosedGroupUpdateV2 → ClosedGroupControlMessage 4 years ago
Niels Andriesse 9ea1ccd0c2 Update ClosedGroupUpdate for new message types 4 years ago
Niels Andriesse 3e5baca72d Fix open group message deletion 4 years ago
Niels Andriesse eeef067f57 Implement message syncing 4 years ago
Niels Andriesse 0dd692cb42 Fix padding 4 years ago
Niels Andriesse 74fd3eb812 Partially implement message syncing 4 years ago
nielsandriesse 947287e42f Debug 4 years ago
Niels Andriesse a6e44ca0f0 Clean 4 years ago
Niels Andriesse d5228abea9 Update notification extension for V2 closed group updates 4 years ago
nielsandriesse d5e1237b0c Allow admins to leave & fix remaining issues 4 years ago
Niels Andriesse ee1d4b1bd5 Debug & make UI clearer 4 years ago
Niels Andriesse ce86d9a196 Debug 4 years ago
Niels Andriesse da503b0df1 Update Session protocol closed groups logic 4 years ago
Niels Andriesse ef1d6392a7 Activate the Session protocol 4 years ago
Niels Andriesse 2a4977d269 Implement Session protocol 4 years ago
nielsandriesse 97d0160138 Fix promise not completing 4 years ago
nielsandriesse f504965dfa Set group context
Android needs this
4 years ago
Niels Andriesse efe8f1c8bb Clean 4 years ago
Niels Andriesse 3f5bc18f6b Fix remaining TODOs 4 years ago
Niels Andriesse 21ec051016 Fix PN sending from share extension 4 years ago
Niels Andriesse 2396f22ede Also notify for newly created groups 4 years ago
Niels Andriesse 67b6162fb9 Fix open group attachment sharing 4 years ago
Niels Andriesse 00549a993f Debug 4 years ago
Niels Andriesse 7a8dbe1bf9 Tighten up error handling a bit more 4 years ago
Niels Andriesse f0cbdb8cda Fix share extension 4 years ago
nielsandriesse d6c115bc2a Fix module linking issue 4 years ago
nielsandriesse 71df0b84f0 Fix incorrect open group message timestamp 4 years ago
nielsandriesse e8661cf4d7 Debug 4 years ago
nielsandriesse f2572e4c91 Fix album message ID handling 4 years ago
nielsandriesse add2c467e4 Restructure 4 years ago
Niels Andriesse 2d8933901d Fix open group display name handling 4 years ago
Niels Andriesse 21810a0c4c Fix closed group message status handling 4 years ago
Niels Andriesse 3cf87d40ab Fix note to self 4 years ago
Niels Andriesse 993c673aad Clean 4 years ago
Niels Andriesse 8564c650a5 Parse open group attachments 4 years ago
Niels Andriesse b621bdc69a Partially fix open groups 4 years ago
Niels Andriesse a88ce33ee0 WIP 4 years ago
Niels Andriesse 3eae001202 Fix disappearing messages 4 years ago
Niels Andriesse 341782f255 Fix profile handling 4 years ago
Niels Andriesse d5dc33e619 Debug 4 years ago
nielsandriesse 5dfd4b1965 Restructure 4 years ago
nielsandriesse 178ab7e3e2 WIP 4 years ago