Commit Graph

138 Commits

Author SHA1 Message Date
Michelle Linington
b0f0051942 Declare more captcha things public and rename one more class
I'm not sure why Xcode isn't flagging this locally. Apologies for the
commit spam.
2021-05-07 17:53:25 -07:00
Michelle Linington
fb1bc08bbd Spam challenge solving infrastructure
Most of this is hidden behind a feature flag and untested. Still waiting
on server support to exercise these endpoints.

- Builds out skeleton for tracking arbitrary spam challenges
- Records a push challenge in response to a server push
- Records a captcha challenge in response to a server precondition
  rejection when fetching prekeys or sending messages

Push challenges should be good to go (once tested). Captcha challenges
still require some work to pause sending and present the captcha to the
user. Server communication for captcha challenges is complete.
2021-05-07 12:13:36 -07:00
Nora Trapp
112e84aaa1 Cleanup 2021-04-29 18:01:20 -07:00
Nora Trapp
a365b45522 Add support for viewed receipts 2021-04-29 18:01:18 -07:00
Matthew Chen
235eb5d119 Payments changes in SignalMessaging. 2021-04-06 13:57:07 -03:00
Nora Trapp
0ef7fc24e6 Revert database recovery attempts, just flag when we detect corruption and prevent app launch. 2021-04-01 12:50:41 -07:00
Nora Trapp
4e535fa7ef Make database recovery async 2021-04-01 12:50:41 -07:00
Matthew Chen
86b8eb08b8 Remove YapDatabase.
Apply asset from design.

Fix rebase breakage.
2021-03-25 11:41:16 -03:00
Matthew Chen
0ff23b8f21 Clean up app readiness. 2021-03-25 10:52:31 -03:00
Jordan Rose
68a27a76e2 Move AxolotlKit model classes into SSK and remove the dependency
We still need the AxolotlKit model classes to migrate old sessions,
but we don't need any of the actual protocol support. This also
means we can drop HKDFKit.

Additionally, we do still use some utilities from AxolotlKit:

- AxolotlExceptions.h: NSException names, should eventually be
  replaced by NSErrors everywhere

- NSData+keyVersionByte.h: prepend/remove public key type byte,
  should eventually be replaced by strong types (ECPublicKey)

- SPKProtocolContext.h: defines the SPKProtocol{Read,Write}Context
  marker protocols, should be replaced by direct use of
  SDSAny{Read,Write}Transaction
2021-03-22 16:17:47 -07:00
Nora Trapp
ec1a1bb9ae Simplify MessageProcessing promises 2021-02-23 10:45:50 -08:00
Nora Trapp
3669066e42 Begone OWSBatchMessageProcessor 2021-02-23 10:45:50 -08:00
Nora Trapp
91d2953843 Begone OWSMessageReceiver 2021-02-23 10:45:50 -08:00
Nora Trapp
4b2be0b8fa Get rid of obsolte SSKMessageDecryptJobQueue 2021-02-23 10:45:50 -08:00
Nora Trapp
3991802fa8 Add appropriate restrictions to when message processing can run. 2021-02-23 10:45:50 -08:00
Nora Trapp
16708b9dd7 Batch message decryption and processing 2021-02-23 10:45:50 -08:00
Jordan Rose
f8c2b764a2 Update for the removal of SMKEnvironment 2021-01-28 12:03:50 -08:00
Matthew Chen
025fc61cd7 Port attachment downloads logic to Swift. 2021-01-21 20:40:24 -03:00
Nora Trapp
08baf57151 Allow sharing to multiple threads 2021-01-12 15:33:54 -08:00
Matthew Chen
686aee752c Rename OWSMessageSender -> MessageSender. 2020-09-17 21:35:35 -03:00
Matthew Chen
c017e76aab Rename singleton accessors. 2020-09-17 21:11:09 -03:00
Matthew Chen
ad6bda8a44 Rename singleton accessors. 2020-09-17 21:11:07 -03:00
Matthew Chen
9aa17e833b Remote deprecation. 2020-09-02 16:51:58 -03:00
Matthew Chen
73c8839061 Convert ContactsViewHelper to singleton. 2020-08-11 17:51:40 -03:00
Michelle Linington
a660a81d0f IOS-668: Reorganize how ContactsUpdater interacts with CDS operations
- Removes ContactsUpdater singleton. It wasn't really tracking much
  state anyway
- Introduces ContactDiscoveryTask. This creates a
  ContactDiscoveryOperation (modern or legacy) and updates the
  SignalRecipients database on completion. Returns a promise.
- Begin migrating away from operation queues

PromiseKit is weird about priority propogation, so this shouldn't be
used yet. Since all then closures are asynced, priorities don't
propogate down to underlying queues. This means the a
ContactDiscoveryTask on the main queue will not boost the priority on
the ModernContactDiscoverOperation's owned operation queue
2020-08-06 12:55:32 -07:00
Matthew Chen
11b2c14ccc Respond to CR. 2020-08-03 14:38:18 -03:00
Matthew Chen
e6e4709487 Merge branch 'release/3.13.3_' 2020-07-31 14:55:24 -03:00
Matthew Chen
39b35b8a6d Do not log unsatisfiable layout constraints.
Thanks Shaun Mirani of ISE for the bug report.
2020-07-31 14:07:04 -03:00
Michelle Linington
e3e903a8ad IOS-631: Suppress message processing pipeline while we have a pending backfill operation
Creates a new root singleton: OWSMessagePipelineSupervisor

As of right now, this singleton has two responsibilities:
- Track all message processing pipeline stages that have registered
  themselves
- Post processing suspension updates to interested stages

Four classes will now register themselves as pipeline stages:
- OWSMessageContentQueue
- YAPDBMessageDecryptQueue
- IncomingGroupsV2MessageQueue
- SSKMessageDecryptJobQueue

At initialization, OWSMessagePipelineSupervisor will take out a pipeline
suspension while it waits for a UUIDBackfillTask to complete. Other
interested objects are also able to suspend the message processing
pipeline by invoking suspendMessageProcessing(for:) on the supervisor
(though, currently this is not used by anything except tests)

This also adds some supporting improvements to UnfairLock. Now,
UnfairLock closures will return the value returned from its critical
section closure.
2020-07-22 21:10:27 -07:00
Matthew Chen
c49a977d3e Merge branch 'release/3.10.3' into release/3.11.0 2020-06-07 15:01:54 -03:00
Nora Trapp
ad64727ecc Evacuate early message cache after memory warning 2020-06-07 10:05:07 -07:00
Matthew Chen
28ff9ac453 Rework model read caches. 2020-06-06 17:37:30 -03:00
Matthew Chen
a0eb61535a Bulk UUID lookup. 2020-04-15 17:11:29 -03:00
Matthew Chen
c38929dae5 Avoid rate limits while doing profile fetches. 2020-04-15 17:03:33 -03:00
Matthew Chen
a4d802a2a2 Avoid rate limits while doing profile fetches. 2020-04-15 17:03:33 -03:00
Matthew Chen
988b11cf2a Remove YDB from views. 2020-04-07 13:51:02 -03:00
Michael Kirk
f198d9037d Merge tag '3.5.0.5' 2020-02-19 19:26:05 -07:00
Michael Kirk
2bed5d0cc3 persist pending read receipts 2020-02-16 13:13:12 -07:00
Matthew Chen
644d341a05 Respond to CR. 2020-02-11 11:41:32 -03:00
Michael Kirk
17a807093c remote config 2020-01-30 20:10:35 -08:00
Matthew Chen
8abc3219c0 Rework v2 group updates. 2020-01-29 13:42:27 -03:00
Matthew Chen
91ee0832f5 Rework v2 group updates. 2020-01-29 13:42:27 -03:00
Matthew Chen
bcfba85356 Add message processing class.
* Modify message processing to allow observation of websocket queue being drained.
* Extend MessageProcessing to allow observation of REST message fetching and "all message fetching and processing".
2020-01-27 10:42:03 -03:00
Michael Kirk
25a3635f2d remote config 2020-01-23 11:40:04 -07:00
Matthew Chen
db0adf077a Respond to CR. 2020-01-23 12:00:42 -03:00
Matthew Chen
892ce5c135 Rework message processing to handle groups v2. 2020-01-17 17:34:37 -03:00
Matthew Chen
72f912dce3 Versioned profile changes, etc. 2020-01-08 13:54:54 -03:00
Matthew Chen
29150102cb Revert group and profile changes. 2019-12-11 20:41:54 -08:00
Matthew Chen
3d88f68cfb Rework new group new creation & group updates. 2019-12-04 15:40:54 -03:00
Michael Kirk
03eaeff374 fixup class rename for serialized messages 2019-11-04 14:06:54 -08:00