Commit Graph

397 Commits

Author SHA1 Message Date
Matthew Chen
ccd2cedbc8 Apply LRUCache everywhere. 2021-06-30 16:01:08 -03:00
Nora Trapp
3a431c25f4 Disable unnecessary job queues from running in extensions 2021-06-24 12:20:46 -07:00
Matthew Chen
c1a9694a59 Rework user profile writes. 2021-06-18 13:46:39 -03:00
Matthew Chen
718120f725 Fix test imports. 2021-06-07 11:41:43 -04:00
Matthew Chen
37052a302a Fix build warnings around imports. 2021-06-07 11:11:30 -04:00
Michelle Linington
21f0fcb2ff Fixes broken tests related to the GroupMembers table
The TSGroupMember table is updated after every inserted interaction. It
asserts that the sender of the interaction is in the group membership.

Before, our tests would construct groups with mock membership and then
construct outgoing messages with the local address as the sender. This
would fail this new requirement.

The fix is to make sure that the local address is in the test group
membership if we'd like to "send" any messages.
2021-05-06 15:45:42 -07:00
Nora Trapp
a365b45522 Add support for viewed receipts 2021-04-29 18:01:18 -07:00
Nora Trapp
4f629e3a35 Fix sticker tests 2021-04-08 14:16:47 -07:00
Matthew Chen
02fbe33779 Payments: SSK Business Logic 2021-04-06 13:57:06 -03:00
Matthew Chen
86b8eb08b8 Remove YapDatabase.
Apply asset from design.

Fix rebase breakage.
2021-03-25 11:41:16 -03:00
Matthew Chen
211b93581b Rework dependency access. 2021-03-25 09:24:27 -03:00
Matthew Chen
d0cbf8cfd0 Rework dependency access. 2021-03-25 09:24:27 -03:00
Jordan Rose
6ddd3ce184 SSK: Remove SPKProtocolContext
Brought over for convenience in the previous commit, but no longer
needed now that everything's in one framework.
2021-03-22 16:18:29 -07: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
Jordan Rose
69d94a7719 SSK: Migrate TestProtocolRunner to SignalClient
Previously this manually initialized two sessions through an
AxolotlKit-provided helper. Rather than expose a similar helper for
SignalClient, TestProtocolRunner now sends an empty message in both
directions to initialize the sessions.
2021-03-22 16:10:42 -07:00
Nora Trapp
5f8f048202 Fix tests 2021-02-23 10:45:50 -08:00
Nora Trapp
91d2953843 Begone OWSMessageReceiver 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
ad6583facb Eliminate usage of decrypt job queue 2021-02-23 10:45:50 -08:00
Matthew Chen
645bd76bd5 Rework app readiness. 2021-02-04 09:55:39 -03:00
Jordan Rose
c7b6ba7010 Make OWSAccountIdFinder's methods into class methods
OWSAccountIdFinder is no longer used for dependency injection in
SignalMetadataKit, so there's no need to allocate empty NSObjects just
to call the methods.

No functionality change.
2021-01-28 12:03:50 -08:00
Jordan Rose
1ea62f2f50 SSK: Update for 'throws' removal in SignalClient 2021-01-28 12:03:50 -08:00
Jordan Rose
aeb78527ea SSK: Update for removal of SMK{Sender,Server}Certificate 2021-01-28 12:03:50 -08:00
Jordan Rose
07c20a5f6f Rename the SignalClient test protocol to avoid conflicts 2021-01-28 12:03:50 -08:00
Jordan Rose
afcfff317f SSK: Convert OWSProvisioningCipher to Swift for SignalClient HKDF 2021-01-28 12:03:49 -08:00
Jordan Rose
1705f36669 SSK: Add a test for sticker decryption 2021-01-28 12:03:49 -08:00
Matthew Chen
4ae673a043 Fix broken test. 2021-01-25 19:40:13 -03:00
Michelle Linington
52ffb5492a Fix tests 2021-01-21 16:21:59 -08:00
Jordan Rose
75f179f572 SSK: Flush DispatchQueue.main after every test
There are a lot of events that get dispatched onto the main queue
(often /from/ the main queue), and processing them during the setup
for the subsequent test can cause problems. In particular, the
notification for setting up a local number in -[OWSMessageManagerTest
test_GroupUpdate] was occasionally being processed in the subsequent
-test_GroupUpdateWithAvatar, depending on how long GRDB took to set up
in the second test.
2021-01-14 16:37:53 -08:00
Nora Trapp
b6cb720ffe Keep signed prekeys for 30 days 2020-12-22 12:37:59 -08:00
Matthew Chen
b13ff0c879 Respond to CR. 2020-10-08 17:31:29 -03:00
Matthew Chen
d364796d9d Remote obsolete remote config & feature flags around gv2. 2020-10-08 17:24:11 -03:00
Nora Trapp
3d5cded4d8 Silently migrate master key to new KBS enclave when necessary 2020-10-06 15:07:11 -07:00
Jordan Rose
3d8d96f532 Make test_messageIsSent less flaky by flushing the global queue
A synchronous barrier block will not run until all prior submitted
items run, and all of the work setting up this test is synchronously
submitted to the global background queue.
2020-09-30 12:53:32 -07:00
Nora Trapp
af822f5c5f PR Feedback 2020-09-21 12:08:36 -07:00
Matthew Chen
686aee752c Rename OWSMessageSender -> MessageSender. 2020-09-17 21:35:35 -03:00
Matthew Chen
70ff0e19c5 Fix broken tests. 2020-09-17 21:11:09 -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
4c432b1ac3 Fix broken tests. 2020-09-17 17:31:23 -03:00
Matthew Chen
aea5df3625 Try to fix broken test. 2020-09-17 17:30:38 -03:00
Matthew Chen
fa96fecdcf Fix spurious test failures. 2020-09-17 17:30:38 -03:00
Nora Trapp
898155b794 Merge branch 'release/3.16.0' 2020-09-03 18:56:52 -07:00
Michelle Linington
1405e46e62 IOS-823: Add description/date to link preview model
Updates the proto definition to add a preview description and date
field. Date and description metadata from fetched content will be sent
over the wire. We can't render it locally yet, but at least this will
allow supporting recipients to display the content.

Also, made some minor changes to HTMLMetadata to better handle article
publish/modified date tags.
2020-09-03 18:19:20 -07:00
Matthew Chen
516fefb1c0 Rework the 'pending member requests and invites' view. 2020-09-03 18:33:07 -03:00
Nora Trapp
1307d7bfd9 Merge branch 'release/3.16.0' 2020-09-02 17:00:36 -07:00
Michelle Linington
e63b16a7e0 IOS-822: Support for parsing additional HTML content
This branch makes improvements to how HTML metadata is parsed. Now,
we'll parse other kinds of opengraph tags as well as title, favicon, and
meta description.

This branch also modifies how URL validation is performed. Before,
international URLs were not supported due to NSURL/NSDataDetectors
handling of punycode. Now, there are mechanisms to detect non-ASCII URLs
that have been parsed and validate that they are comprised of the
correct characters.
2020-09-02 14:50:12 -07:00
Matthew Chen
3b814d0130 Fix broken tests. 2020-09-02 16:31:42 -03:00
Matthew Chen
a20834d572 Respond to CR. 2020-09-02 13:44:15 -03:00
Matthew Chen
825cb06edb Animated sticker support. 2020-09-02 13:44:15 -03:00