Commit Graph

1480 Commits (00d79900e48e5374f6ae9584820583570d51a2e3)

Author SHA1 Message Date
Matthew Chen 3b06434d4f Split out second web socket. 7 years ago
Matthew Chen c137e95ae5 Move socket manager to hang on SSKEnvironment. 7 years ago
Matthew Chen fbfda5b9db Respond to CR. 7 years ago
Matthew Chen 1a23186ec4 Fix 'info message for group events'. 7 years ago
Matthew Chen 61a99c3f87 Further sender cleanup. 7 years ago
Matthew Chen f2a9c10c20 Respond to CR. 7 years ago
Matthew Chen a697072271 Respond to CR. 7 years ago
Matthew Chen f9e90215b3 Respond to CR. 7 years ago
Michael Kirk 2b805e4eae Constantize ConversationColorName, map previous incorrect values 7 years ago
Michael Kirk d59e21e7f0 Nothing outside of TSThread should know about legacy colors 7 years ago
Michael Kirk 405cc31a38 Apply new colors to new conversation 7 years ago
Matthew Chen ccb67f49a3 Fix issues in UD send & receive. 7 years ago
Matthew Chen 0b41e5e240 Rework profile fetch to reflect UD changes. 7 years ago
Matthew Chen 1e10a86635 UD send via REST. 7 years ago
Matthew Chen 24b0eed1f6 UD send via REST. 7 years ago
Matthew Chen d08479980d UD send via REST. 7 years ago
Matthew Chen c856859fbd Fix build breakage. 7 years ago
Matthew Chen 1b25a18e57 Respond to CR. 7 years ago
Michael Kirk f243914fe5 NSTemporaryDirectory -> OWSTemporaryDirectory/AccessibleAfterFirstAuth
Remove redundant move - AFNetworking alread moves the CFNetwork tmp file for
us.
7 years ago
Matthew Chen f0b16186cd Respond to CR. 7 years ago
Matthew Chen b8c5e14758 Apply UD trust root value for staging. 7 years ago
Matthew Chen 0c0d2a702e Decrypt incoming UD messages. 7 years ago
Matthew Chen cec8df422e Respond to CR. 7 years ago
Matthew Chen 3eb84ed0e0 Move message processing singletons to SSKEnvironment. 7 years ago
Matthew Chen 580d0486b6 Respond to CR. 7 years ago
Matthew Chen 9f2a15925a Add new envelope properties for UD. 7 years ago
Matthew Chen 4ab281346a Respond to CR. 7 years ago
Matthew Chen 39f1be65f3 Respond to CR. 7 years ago
Matthew Chen 1b1312c455 Clean up ahead of CR. 7 years ago
Matthew Chen 1d40cbfb41 Rework account attributes; persist manual message fetch; add "unrestricted UD" setting. 7 years ago
Michael Kirk 6560358375 Fix failed attachment downloads in beta 7 years ago
Matthew Chen b808c2b33b Respond to CR. 7 years ago
Matthew Chen dca46e019f Respond to CR. 7 years ago
Matthew Chen e98c572158 Sketch out sender certificate validation. 7 years ago
Matthew Chen 45233ec862 Revert UD server certificate parsing. 7 years ago
Matthew Chen f7379deb69 Add setup method to UD manager. Try to verify server certificate expiration. 7 years ago
Matthew Chen 7fd15d2fd9 Add server certificate methods to UD manager. 7 years ago
Matthew Chen b714e528f5 Add UDManager. 7 years ago
Matthew Chen 21177e84db Fix or disable tests broken by recent merges. 7 years ago
Matthew Chen 71da312336 Post-SMK ud changes. 7 years ago
Matthew Chen 2c4c096d93 Fix typo in swift names. 7 years ago
Matthew Chen db487705c3 Fix breakage in the tests. 7 years ago
Michael Kirk 006021ea41 Fix: group color change doesn't immediately apply
Because we were fetching a new thread instance, instead of updating the
existing thread instance, classes which were bound to the old thread instance
weren't updating. This affected the HeaderView.AvatarView.thread and the
ConversationStyle.thread.
7 years ago
Matthew Chen 7d727b7ac9 Modify proto wrapper builders to require required fields. 7 years ago
Matthew Chen 74e456f90e Modify proto wrapper builders to require required fields. 7 years ago
Matthew Chen 04db4ca950 Get SMK tests building and passing. 7 years ago
Matthew Chen 8f5e21c7cf Fix build breakage from SMK. 7 years ago
Matthew Chen 3738155c81 Fix build breakage from SMK. 7 years ago
Matthew Chen 8ae200ac21 Fix build breakage around SignalCoreKit. 7 years ago
Matthew Chen b77528ca0a Fix asserts & logging. 7 years ago
Matthew Chen 0125535d4d Pull out SignalCoreKit. 7 years ago
Matthew Chen ebae75af00 Revert 'new sort id'. 7 years ago
Matthew Chen 3c22d0b0c8 Swift exit(). 7 years ago
Michael Kirk e3e6c31612 fix hang on conversation load 7 years ago
Michael Kirk 79add78d51 Merge branch 'release/2.30.1' 7 years ago
Matthew Chen bb5c9ff106 Respond to CR. 7 years ago
Matthew Chen c0f4254599 Mark CDS feature flag for removal. 7 years ago
Matthew Chen 0884598a3a Fix CDS cookie handling. 7 years ago
Matthew Chen c368aabf9c Fix the "de-register" logic. 7 years ago
Matthew Chen b10bf441c4 Add note about curl cookie support. 7 years ago
Matthew Chen 370c96af53 Enable CDS in contact intersection. 7 years ago
Matthew Chen 43d0b9b9bf Fix misnamed method. 7 years ago
Matthew Chen b6a14ea014 Fix the CDS version checking. 7 years ago
Matthew Chen bcb882f5aa Update CDS URLs. 7 years ago
Matthew Chen b3ad6e27dc Rework conversation message bubble colors; add "conversation colors" class. 7 years ago
Matthew Chen 8db4595bdc Rework group avatars to reflect conversation colors. 7 years ago
Michael Kirk fe7d69e9c6 Update thread's sorting order based on whatever the currently last message is 7 years ago
Michael Kirk 02692e42bd remove addressed TODO's 7 years ago
Michael Kirk 3240e0d9d0 Be explicit about receivedAt time
We were often using `timestampForLegacySorting`, which is convoluted for when
we actually just want received time.

In some sense this is a superficial change, but it's part of auditing that
we've completed moved away from timestampForLegacySorting.
7 years ago
Michael Kirk 6bfd0f29ed mark self-sent messages as read as soon as it was created 7 years ago
Michael Kirk c0c973de1c Sort gallery finder by sortId 7 years ago
Michael Kirk b281b37637 replace thread.lastMessageDate/archivalDate -> thread.lastSortId, thread.archivedAsOfSortId
Update migration accordingly

Date shown on home view cell is message.receivedAt
7 years ago
Michael Kirk 90aa593dcd sortId vs. Read status 7 years ago
Michael Kirk 089c4f09ea bump all views which rely on message sorting 7 years ago
Michael Kirk ab55e85304 step 1: timestampForSorting audit, change signature
No change in functionality in this commit, I just broke the signature to have a
systematic audit of the callsites. Added TODO's with the plan for each call.
7 years ago
Michael Kirk e1a46d85fb investigation shows we don't use this timestamp for call error messages 7 years ago
Michael Kirk df61316495 minimize diff senderTimestamp -> timestamp 7 years ago
Michael Kirk 00d0d1e002 Remove legacy Error backdating - no changes in functionality
Historically we would backdate the SN change messages, but since adopting
non-blocking SN changes long ago, they're already sorted properly by creation
time, so backdating has been unnecessary for a while.

I also audited that all other error messages are saved directly after creation.

I applied deprecation attributes as appropriate as I audited.
7 years ago
Michael Kirk 550e7ba63b Create disappearing message update info messages before messages they affect
Since we're no longer sorting by timestamp we have to ensure we save the update
info message before we save any affected message, e.g. in the case of implicit
updates.
7 years ago
Michael Kirk eef1368ad3 Timestamp audit step1: change signature
There is no change in functionality in this commit.

Apart from clarifying what the timestamp means (it's the timestamp of the
*sender*), this intentionally breaks all the call sites, so I could have a sane
way to thoroughly audit wherever we're passing in timestamps, to see where
we're depending on them to affect sort order.

For the sake of a cleaner diff of meaningful changes, instead of "fixing"
everything in this commit, I've just added comments and renamed signatures.
7 years ago
Michael Kirk a60d8eb161 WIP: migration / autoincrement logic
TODO:

-[ ] contact offer
-[ ] verify all paths that utilized timestampForSorting, e.g. make sure SN appear before the message they affect, etc.
-[x] Monotonic ID
-[x] New extension which sorts by id
-[x] Migration
  -[ ] batch migration?
7 years ago
Matthew Chen 72562920ed Fix author conversation colors. 7 years ago
Michael Kirk bccb633b6c fix release compile 7 years ago
Matthew Chen 8910f1f65a Enable conversation colors. 7 years ago
Matthew Chen 98630cca50 Respond to CR; add db utility methods to test base classes. 7 years ago
Matthew Chen 559c496ae5 Clean up. 7 years ago
Matthew Chen 66fc389fba Get SSK tests building and running. 7 years ago
Matthew Chen 87836f506b Move more singletons to SSKEnvironment. 7 years ago
Matthew Chen 39ebdf0921 Log curl command for failed requests in debug builds. 7 years ago
Matthew Chen 15b52db8bf Respond to CR. 7 years ago
Matthew Chen 29bb69032a DRY up the debounce of db extension version increment. 7 years ago
Matthew Chen e8186a7005 Fix rebase breakage. Make environment properties mutable in tests. 7 years ago
Matthew Chen 3b2c5bfc7b Modify mock environments to register all db views. 7 years ago
Matthew Chen 83e6484156 Respond to CR. Rework how OWSUploadOperation's networkManager property. 7 years ago
Matthew Chen edcedd2845 Remove selfRecipient method. 7 years ago
Matthew Chen e1db60c1c0 Rework creation of singletons. 7 years ago
Matthew Chen 4ad7ca79b7 Respond to CR. 7 years ago
Matthew Chen e8eac9f30b Clean up ahead of PR. 7 years ago
Matthew Chen b883209f91 Refine logging. 7 years ago
Matthew Chen 69290f7ec8 Improve logging around failied keychain deletion. 7 years ago
Matt Rubin d25579e478 Treat failure to delete a non-existent password as success
Fixes https://github.com/signalapp/Signal-iOS/issues/3876
7 years ago
Michael Kirk e1f131f09c restore save after marking item as uploaded
This was lost in an earlier fixup commit - markAsAccepted mutates but does not
persist anything since SPK doesn't know about YapDB
7 years ago
Michael Kirk cb55ba57f5 CR: rename classes, no functional changes 7 years ago
Michael Kirk 9f35b93647 CR: clarify comment 7 years ago
Michael Kirk 9bca1c8e52 Add some missing nullability annotations 7 years ago
Michael Kirk b3d3c27f39 CR: Split operations into separate files (no changes in functionality) 7 years ago
Michael Kirk ff3e9bcdd1 cr: add comment about operation queue 7 years ago
Michael Kirk bfd8eb63c6 Add some comments/nullability annotations for clarity 7 years ago
Michael Kirk c9218b59ca CR: add operation queue name 7 years ago
Michael Kirk 5a7d7634bf store keys before uploading to avoid race condition with service 7 years ago
Michael Kirk 1853e79c3e Don't retry send until SPK has been rotated
// FREEBIE
7 years ago
Michael Kirk 5e1306aaa5 Restore check debounce 7 years ago
Michael Kirk 8e488b5c3b remove unused code 7 years ago
Michael Kirk 85d35b52d6 restore PreKey upload failure tracking 7 years ago
Michael Kirk 39b691b697 Fix operations not being de-alloced 7 years ago
Michael Kirk 619597cd61 ensure operations run to completion on the PreKey operation queue 7 years ago
Michael Kirk 3df0e72eda Extract SPK rotation and CreatePreKey operations 7 years ago
Michael Kirk 286d3c8ce9 Serialize RefreshKeyOperation
TODO

-[] rotate signed prekey job
-[] verify current prekey w/ server
-[] create keys
7 years ago
Michael Kirk 01811a4891 fix swift method signature 7 years ago
Michael Kirk b11bd6ea46 extract convenience intitializer for param parser 7 years ago
Michael Kirk 1eb05c1d01 remove unused preKeyLastResort 7 years ago
Michael Kirk 920a82564f Merge tag '2.29.3.3' 7 years ago
Matthew Chen 22afe39cd0 Respond to CR. 7 years ago
Matthew Chen 2ea751bbac Clean up attachment downloads. 7 years ago
Matthew Chen 32f1ce9473 Clean up attachment downloads. 7 years ago
Matthew Chen b00858921d Update Cocoapods. 7 years ago
Matthew Chen 9b94580dae Update assertions.
* Streamline precompiled headers.
* Remove obsolete assertions in Constraints.h.
7 years ago
Matthew Chen e15b8ebe16 Add names to operation queues. 7 years ago
Matthew Chen 62c55c9cfb Fix broken tests. 7 years ago
Matthew Chen 2ba642c9e9 Ensure fakes/mocks are debug-only. 7 years ago
Matthew Chen e784f9feeb Move fakes to SSK/tests. 7 years ago
Michael Kirk df67e883f3 BlockList vs. "zero length" group names 7 years ago
Michael Kirk 24ea8262d5 consolidate blocked-group state tracking 7 years ago
Michael Kirk 0f9b0936df Use cached group details when rendering blocklist 7 years ago
Michael Kirk 1f15ba6dc5 Cache group details on blocking manager
In case the group thread is later deleted.
7 years ago
Michael Kirk b96e9a6a82 Fix: not receiving group deliveries
Previously we were using the wrong method - the local user's id is removed
from group.recipientIdentifiers
7 years ago
Michael Kirk f1e5b1862f Ignore messages from left groups 7 years ago
Michael Kirk b369ffa88f add type annotations 7 years ago
Michael Kirk b6eb1476cb Leave group when blocking it 7 years ago
Michael Kirk 2c9d905a16 Message processor ignores messages from blocked group 7 years ago
Michael Kirk eadb04efcc WIP: ContactViewHelper incorporates group blocking
-[ ] UI
  -[ ] Conversation Settings
    -[x] Show switch for group
    -[ ] localize
    -[ ] migrate existing localizations? (nice to have)
    -[ ] can view conversation settings (but not edit them) in left group
    -[ ] special block copy for groups
    -[ ] special unblock copy for groups
  -[ ] ConversationViewHelper
   -[x] Track blocked groups
   -[ ] HomeView
   -[ ] ConversationView
   -[ ] Any others?
   -[ ] Rename? Extract BlockList cache?
  -[ ] Block List
    -[ ] Group Section
    -[ ] Unblock group
  -[ ] Interstitial interacting with blocked threads (e.g. thread picker)
    -[ ] BlockListUIUtils w/ thread
        -[x] Block
        -[x] Unblock
        -[ ] Replace usages where possible
        -[x] block manager
-[ ] Sync
  -[x] tentative protos
  -[ ] confirm protos w/ team
  -[x] send new protos
-[ ] Message Processing
  -[ ] Drop messages from blocked groups
7 years ago
Michael Kirk b282d51da0 SyncMessages for blocked groups 7 years ago
Michael Kirk 236c17f65e WIP: group blocking
-[ ] UI
  -[ ] Conversation Settings
    -[x] Show switch for group
    -[ ] localize
    -[ ] migrate existing localizations? (nice to have)
    -[ ] can view conversation settings (but not edit them) in left group
    -[ ] special block copy for groups
    -[ ] special unblock copy for groups
  -[ ] Block List
    -[ ] Group Section
    -[ ] Unblock group
  -[ ] Interstitial interacting with blocked threads (e.g. thread picker)
    -[ ] BlockListUIUtils w/ thread
        -[x] Block
        -[x] Unblock
        -[ ] Replace usages where possible
        -[x] block manager
-[ ] Sync
  -[x] tentative protos
  -[ ] confirm protos w/ team
  -[ ] send new protos
-[ ] Message Processing
  -[ ] Drop messages from blocked groups
7 years ago
Michael Kirk bfe1f38c75 update protos for group blocking 7 years ago
Michael Kirk 08c0b248ed fix group avatar updates and quote generation
don't shadow same-named variable
7 years ago
Matthew Chen 25239ca608 Respond to CR. 7 years ago
Matthew Chen 3935b019f4 Add base class for tests. 7 years ago
Michael Kirk e4d12feeb9 rev gallery db extension since our `isValid` checks have changed 7 years ago
Matthew Chen 106ecf2e8e Respond to CR. 7 years ago
Matthew Chen cc117b385c Modify environment accessors to use our 'shared' convention. 7 years ago