Commit Graph

6082 Commits

Author SHA1 Message Date
Matthew Chen
ea6f8a7f86 Clean up formatting of MOB values for display. 2021-04-06 13:57:08 -03:00
Matthew Chen
3ddeb4fae0 Reduce size of payment sync messages, enforce more model invariants, fill in missing ledger block timestamps in reconciliation. 2021-04-06 13:57:08 -03:00
Matthew Chen
d77ae7d012 Fix broken tests, bugs. 2021-04-06 13:57:08 -03:00
Matthew Chen
b872c2c408 Use MC SDK to device maximum transaction amount. 2021-04-06 13:57:08 -03:00
Matthew Chen
e9d23af718 Defragmentation. 2021-04-06 13:57:08 -03:00
Matthew Chen
d1f6b56658 Defragmentation. 2021-04-06 13:57:08 -03:00
Matthew Chen
bac06335d4 Defragmentation. 2021-04-06 13:57:07 -03:00
Matthew Chen
94bcff84e7 Defragmentation. 2021-04-06 13:57:07 -03:00
Matthew Chen
e10e9ee9fb Update MC SDK. 2021-04-06 13:57:07 -03:00
Matthew Chen
b3b0add5bf Improve custom payments keyboard. 2021-04-06 13:57:07 -03:00
Matthew Chen
09aa196176 Add debug flag to simulate requests not completing. 2021-04-06 13:57:07 -03:00
Matthew Chen
742d26a5e6 Update Cocoapods. 2021-04-06 13:57:07 -03:00
Matthew Chen
590067499a Payments entropy, storage service, backup + restore flows.
* Update how payments state is stored in storage service.
* Build 'view passphrase' UI flow.
* Build 'restore payments wallet' UI flow.
* Rework the 'view passphrase' UI flow.
2021-04-06 13:57:07 -03:00
Matthew Chen
23aa187cea Add the "disable payments" flow.
* Show memo message in send payment view.
2021-04-06 13:57:07 -03:00
Matthew Chen
ae77b8f07d Integrate with SwiftLog / MC SDK logging. Refine payments. 2021-04-06 13:57:07 -03:00
Matthew Chen
76cc8df5ee Integrate with SwiftLog / MC SDK logging. Refine payments. 2021-04-06 13:57:07 -03:00
Matthew Chen
8c4cfcc9f9 Rework payments error handling. 2021-04-06 13:57:07 -03:00
Matthew Chen
cbfc7be372 Revisions to payments in SSK. 2021-04-06 13:57:07 -03:00
Matthew Chen
a73b44ca5f Respond to CR. 2021-04-06 13:57:06 -03:00
Matthew Chen
ce84309224 Small improvements around payments. 2021-04-06 13:57:06 -03:00
Matthew Chen
87ace3779d Respond to CR and proto schema/reconciliation review. 2021-04-06 13:57:06 -03:00
Matthew Chen
70f3675585 Clean up ahead of PR. 2021-04-06 13:57:06 -03:00
Matthew Chen
02fbe33779 Payments: SSK Business Logic 2021-04-06 13:57:06 -03:00
Matthew Chen
81348a315d Clean up ahead of PR. 2021-04-06 13:57:06 -03:00
Matthew Chen
6f50652877 Payments: Models (generated changes) 2021-04-06 13:57:06 -03:00
Matthew Chen
a00d14ddc4 Payments: Models 2021-04-06 13:57:06 -03:00
Matthew Chen
3a8e4bcbc5 Payments: feature flags 2021-04-06 13:57:06 -03:00
Matthew Chen
2d0fdff372 Payments: Update proto schema. 2021-04-06 13:57:06 -03:00
Matthew Chen
e552062be8 Refine error handling in group profile fetching. 2021-04-05 16:22:26 -03:00
Matthew Chen
4c082f1aed Bump GRDB schema version. 2021-04-04 12:13:16 -03:00
Nora Trapp
d4ca67bd82 Feature flags for .qa. 2021-04-01 15:13:40 -07:00
Nora Trapp
3b49a03a5f Feature flags for .beta. 2021-04-01 15:13:30 -07: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
722675525d Change device transfer hotswap to avoid database corruption. 2021-04-01 12:50:41 -07:00
Nora Trapp
db5532b590 protect database recovery from orphan data cleaner 2021-04-01 12:50:41 -07:00
Nora Trapp
4e535fa7ef Make database recovery async 2021-04-01 12:50:41 -07:00
Nora Trapp
0fee67ae60 Attempt to recover database if corruption was detected 2021-04-01 12:50:41 -07:00
Matthew Chen
71c2f5280b Feature flags for .qa. 2021-04-01 10:36:52 -03:00
Matthew Chen
12275aefda Feature flags for .beta. 2021-04-01 10:36:30 -03:00
Matthew Chen
63ec24c37d Feature flags for .qa. 2021-03-31 00:41:43 -03:00
Matthew Chen
03e9fa460d Feature flags for .beta. 2021-03-31 00:40:35 -03:00
Matthew Chen
8effc2be5f Feature flags for .qa. 2021-03-29 06:56:54 -03:00
Matthew Chen
e9ba4fc40b Feature flags for .beta. 2021-03-29 06:56:47 -03:00
Nora Trapp
fa86b71ec7 Don't start message fetch job in share extension 2021-03-27 12:22:58 -07:00
Nora Trapp
c40a786050 Fix extensions in post YDB world 2021-03-27 12:13:20 -07:00
Nora Trapp
6c17505b68 Sync mute with storage service 2021-03-27 12:13:20 -07:00
Nora Trapp
63da30f617 Store mute as millisecond timestamp 2021-03-27 12:13:20 -07:00
Nora Trapp
6a9e10a62d Add eight hour and always mute options. 2021-03-27 12:13:20 -07:00
Nora Trapp
2e9c651355 Add an internal setting to keep muted chats archived when receiving new messages 2021-03-26 16:17:17 -07:00
Nora Trapp
3d526f6c41 Add more logging to EarlyMessageManager 2021-03-26 16:15:49 -07:00
Matthew Chen
98d0149095 Fix broken tests. 2021-03-25 14:28:27 -03:00
Matthew Chen
b116d40a8c Respond to CR. 2021-03-25 13:31:45 -03: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
Matthew Chen
b4aa2aa1c3 Clean up app readiness. 2021-03-25 09:36:16 -03:00
Matthew Chen
5a38487b40 Make dependency accessors final where possible. 2021-03-25 09:24:27 -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
Matthew Chen
af1e1d0eb3 Rework dependency access. 2021-03-25 09:24:27 -03:00
Jordan Rose
e4dc5ee9b3 Remove 'SignalClient.' prefixes where no longer needed 2021-03-22 16:19:46 -07:00
Jordan Rose
1a55d29922 Prefix AxolotlKit session model classes with "Legacy"
PreKeyRecord, PreKeyBundle, and SignedPreKeyBundle are still used
outside of serialized sessions, so it doesn't make sense to mark them
"Legacy" just yet. Additionally, the keyed archiver overrides have to
be set up before any instances are unarchived, which is trickier for
these remaining model types.
2021-03-22 16:19:31 -07:00
Jordan Rose
57eb94cf60 Strip out unneeded parts of the AxolotlKit model classes
- Remove Chain protocol
- Delete most SessionState mutators
- Expose SessionState.receivingChains directly
- Remove ChainAndIndex class
2021-03-22 16:19:05 -07: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
Matthew Chen
78c2bc9090 Feature flags for .qa. 2021-03-17 21:47:04 -03:00
Matthew Chen
20b75269b7 Feature flags for .beta. 2021-03-17 21:47:00 -03:00
Matthew Chen
ce291aa84a Feature flags for .production. 2021-03-17 21:46:50 -03:00
Matthew Chen
f3f7eb3386 Fix issue around profile key updates for groups with stale group state. 2021-03-17 19:18:38 -03:00
Matthew Chen
a322c1f25e Feature flags for .qa. 2021-03-16 20:01:39 -03:00
Matthew Chen
f589ad3461 Feature flags for .beta. 2021-03-16 20:00:03 -03:00
Matthew Chen
07582ad16d Feature flags for .qa. 2021-03-15 17:04:45 -03:00
Matthew Chen
14095f84b4 Feature flags for .beta. 2021-03-15 17:04:37 -03:00
Matthew Chen
9be2b05243 Feature flags for .qa. 2021-03-15 08:05:50 -03:00
Matthew Chen
c14cee7e74 Feature flags for .beta. 2021-03-15 08:05:44 -03:00
Nora Trapp
02ed5b3ac6 PR Feedback 2021-03-12 17:07:19 -08:00
Matthew Chen
6f737748e9 Avoid profile key conflicts. 2021-03-12 17:05:02 -08:00
Nora Trapp
4743cf9af3 PR Feedback 2021-03-12 16:59:56 -08:00
Nora Trapp
ab01ec94aa Fix local profile key changed notification 2021-03-12 16:59:56 -08:00
Nora Trapp
2bb61cd700 Ensure we're never using a profile key that is newer than our latest profile on the service 2021-03-12 16:59:56 -08:00
Matthew Chen
f7aed67538 Fix large sticker downloads. 2021-03-12 08:40:15 -03:00
Matthew Chen
35f259fcbf Feature flags for .qa. 2021-03-10 21:51:29 -03:00
Matthew Chen
0d459df77c Feature flags for .beta. 2021-03-10 21:51:21 -03:00
Matthew Chen
d7ac30816f Feature flags for .qa. 2021-03-10 20:25:57 -03:00
Matthew Chen
f1b78aa081 Feature flags for .beta. 2021-03-10 20:25:48 -03:00
Nora Trapp
49c17f2af8 Add new delete account flow 2021-03-09 12:17:32 -08:00
Matthew Chen
0d3a8fdb4c Feature flags for .qa. 2021-03-06 10:45:27 -03:00
Matthew Chen
493a8549d8 Feature flags for .beta. 2021-03-06 10:45:22 -03:00
Matthew Chen
b351c4fa9a Feature flags for .production. 2021-03-06 10:45:15 -03:00
Nora Trapp
a0ff3920a8 Feature flags for .qa. 2021-03-05 23:12:43 -08:00
Nora Trapp
765a4f87c5 Feature flags for .beta. 2021-03-05 23:12:25 -08:00
Matthew Chen
c2caa4c335 Feature flags for .qa. 2021-03-05 13:58:51 -03:00
Matthew Chen
bc1bd934a2 Feature flags for .beta. 2021-03-05 13:58:41 -03:00
Matthew Chen
37c8ca29d6 Feature flags for .qa. 2021-03-05 11:15:27 -03:00
Matthew Chen
9a64146c64 Feature flags for .beta. 2021-03-05 10:58:57 -03:00
Matthew Chen
30bf4d52c3 Feature flags for .qa. 2021-03-05 10:07:44 -03:00
Matthew Chen
b151a9a8d5 Feature flags for .beta. 2021-03-05 10:07:33 -03:00
Nora Trapp
91c8b4a250 Further design feedback 2021-03-04 18:32:24 -08:00
Nora Trapp
450870de44 Design feedback 2021-03-04 18:32:24 -08:00
Jordan Rose
9cf01c3fd2 MediaGallery: fix multi-threading bug caught by previous commit! 2021-03-04 10:48:19 -08:00
Jordan Rose
15a4a1a9cd MediaGallery: delete old Finder API, including its Yap implementation 2021-03-04 10:30:54 -08:00
Jordan Rose
3b90f1b761 MediaGallery: Filter recently-deleted items from database queries
And rewrite and simplify the rest of deletion logic appropriately.
(Thanks to Nora for the strategy.)

There is one tough case here: database updates have happened
/externally/ (say, from a disappearing message expiring), in which
case the database will be updated but the MediaGallery model will not.
In this case we've broken the invariant that we have the correct count
for each month-section, and need to put a hold on database access
until the model has been updated. The only effect of this is in the
page-based media VC, where we'll exit out of the browser rather than
advancing to the next item if the item we were looking at was deleted
/and/ the next item hasn't been loaded yet. (This can happen if you're
at the start of a message with many items and the whole message gets
deleted.)
2021-03-04 10:30:54 -08:00
Jordan Rose
15e92998cb MediaGallery: use OrderedDictionary as the backing store
...rather than a flat list of loaded MediaGalleryItems. This is
similar to the ad hoc approach in MediaTileViewController in the
previous commit, but is consistent across MediaPageViewController as
well.

Still not handled yet: deletions, also avoiding redundant database
access
2021-03-04 10:30:54 -08:00
Jordan Rose
29a2884743 Rewrite the All Media collection view controller
- Measure an entire section all at once, so items don't jump around
- Load individual items lazily by section instead of by plain index
- Search for more sections by enumerating timestamps

Does not handle deletes yet. Also I haven't removed all the old APIs.
2021-03-04 10:30:54 -08:00
Jordan Rose
76b716462e SSK: Make OrderedDictionary a struct and improve it a bit
- Now a struct, meaning no need for a clone() method
- Now a RandomAccessCollection indexed by Int
- Removed the subscript setter that EarlyMessageManager was using to
  make the reordering behavior more explicit
- Generalized insert(key:value:isAppend:) to insert(key:at:value:)
- Added removeSubrange(_:)
2021-03-04 10:30:54 -08:00
Jordan Rose
26037ff8f4 Database: Remove @escaping from all synchronous transaction callbacks 2021-03-04 10:30:54 -08:00
Jordan Rose
f3b87c1ee7 MediaGalleryFinder: factor out common SQL query builder 2021-03-04 10:30:54 -08:00
Nora Trapp
28a17ec257 Add internal settings view 2021-03-03 20:32:36 -08:00
Matthew Chen
47a4b88467 Feature flags for .qa. 2021-03-04 00:16:38 -03:00
Matthew Chen
0c2205580a Feature flags for .beta. 2021-03-04 00:16:30 -03:00
Matthew Chen
b08438849d Feature flags for .qa. 2021-03-04 00:10:36 -03:00
Matthew Chen
0c85efa3ef Feature flags for .beta. 2021-03-04 00:10:21 -03:00
Michelle Linington
852e8261d8 Lint 2021-03-03 12:51:07 -08:00
Michelle Linington
adabc1a06e PR Feedback
The most significant change here is we defer initial loading of
collision interactions. We shouldn't block the main thread during
conversation presentation.

Instead, we'll perform it at UserInitiatedQoS. Once complete, we'll call
-ensureBannerState. Subsequent banner state updates will use the cached
interactions to find name collisions.
2021-03-03 12:51:07 -08:00
Michelle Linington
a7aa17c7dd Better write handling 2021-03-03 12:51:07 -08:00
Michelle Linington
15eb64086c Most of the work for profile spoofing in group membership
This separates the logic for finding spoofed profiles from the view
controller responsible for reporting collisions to the user
2021-03-03 12:51:07 -08:00
Matthew Chen
dab3994b3a Add logging around profile key rotation. 2021-03-03 17:20:02 -03:00
Jon Chambers
07d3ec2c6e Restore two-enclave configuration. 2021-03-03 17:18:36 -03:00
Matthew Chen
213b0ba702 Respond to CR. 2021-03-03 17:18:36 -03:00
Jon Chambers
ca877d293d Update KBS constants to match the latest staging deployment. 2021-03-03 17:18:36 -03:00
Jordan Rose
ae0fb0aea4 Remember to free OpenSSL-allocated memory 2021-03-03 09:50:40 -08:00
Matthew Chen
4ce2c3adb8 Feature flags for .qa. 2021-03-01 10:49:05 -03:00
Matthew Chen
f119a87e03 Feature flags for .production. 2021-02-27 09:09:24 -03:00
Matthew Chen
426d52b468 Feature flags for .qa. 2021-02-26 17:56:15 -03:00
Matthew Chen
ef0fb70b02 Feature flags for .beta. 2021-02-26 17:56:02 -03:00
Nora Trapp
de5afa9467 Use server timestamp to validate UD messages 2021-02-26 11:56:47 -08:00
Nora Trapp
2ef8db1d9f Fix excessive threadless errors 2021-02-26 11:48:29 -08:00
Nora Trapp
eff026a8d5 Don't insert decryption errors for blocked conversation 2021-02-25 13:20:05 -08:00
Matthew Chen
d19a94d328 Feature flags for .qa. 2021-02-24 21:53:11 -03:00
Matthew Chen
51e0719152 Feature flags for .beta. 2021-02-24 21:52:37 -03:00
Matthew Chen
d325b57bff Respond to CR. 2021-02-24 21:13:25 -03:00
Matthew Chen
b7e9bd906d Batch processing of synced contacts. 2021-02-24 21:13:25 -03:00
Matthew Chen
39feb7eb43 Respond to CR. 2021-02-24 18:03:10 -03:00
Matthew Chen
93fc3dd3db Filter as e164. 2021-02-24 18:00:54 -03:00
Nora Trapp
38013fb312 Fix handling of SMK decryption errors 2021-02-24 11:25:08 -08:00
Jordan Rose
f9025cc0d8 Update SignalClient, and stop using cocoapods-binary to build it
Includes updates for SignalMetadataKit and SignalServiceKit for the
change requiring SenderCertificates to always have UUIDs.
2021-02-23 14:18:16 -08:00
Matthew Chen
8017d0da50 Allow group migrations to work if a member never had a versioned profile. 2021-02-23 15:57:49 -03:00
Nora Trapp
ec1a1bb9ae Simplify MessageProcessing promises 2021-02-23 10:45:50 -08:00
Nora Trapp
5f8f048202 Fix tests 2021-02-23 10:45:50 -08:00
Nora Trapp
9ea30bc09a lint fix 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
Nora Trapp
3e687e5c7f Remove signaling key support 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
83501fd24b Feature flags for .qa. 2021-02-19 21:35:01 -03:00
Matthew Chen
ee649a2cc2 Add logging around auto-whitelisting of group conversations. 2021-02-19 10:05:36 -03:00
Matthew Chen
bd1fb3dde6 Feature flags for .production. 2021-02-19 09:40:28 -03:00
Nora Trapp
5c970e95da Fix sending of delivery receipts 2021-02-19 09:32:53 -03:00
Matthew Chen
c0cccf1a9e Feature flags for .qa. 2021-02-18 11:37:31 -03:00
Matthew Chen
71fa1b03ce Feature flags for .beta. 2021-02-18 11:37:26 -03:00
Matthew Chen
a6692967b4 Feature flags for .production. 2021-02-18 11:37:18 -03:00
Matthew Chen
98400a71b4 Improve robustness of sticker handling. 2021-02-18 09:20:03 -03:00
Nora Trapp
7ba48d8484 PR Feedback 2021-02-17 12:00:50 -08:00
Nora Trapp
49cf699733 Process messages in the same transaction they were decrypted in 2021-02-17 12:00:50 -08:00
Nora Trapp
26253a0a27 Set the proto address during initialization 2021-02-16 13:05:13 -08:00
Matthew Chen
21fc366534 Feature flags for .qa. 2021-02-15 14:33:10 -03:00
Matthew Chen
fa5eebb67b Feature flags for .beta. 2021-02-15 14:19:36 -03:00
Michelle Linington
5341d59ba1 Lint 2021-02-12 14:03:16 -08:00
Michelle Linington
3c7e96fcd4 PR Feedback 2021-02-12 13:14:48 -08:00
Michelle Linington
b4d36dcf31 Design changes for onboarding 2021-02-12 13:14:13 -08:00
Nora Trapp
5a415e004d Remove OWSMessageServiceParams 2021-02-12 12:02:15 -08:00
Nora Trapp
651cdef9a8 Remove legacy 'silent' flag 2021-02-12 11:59:35 -08:00
Nora Trapp
514b803fdb Fix 'online' flag for message sending 2021-02-12 11:59:34 -08:00
Matthew Chen
54dcbbe693 Feature flags for .qa. 2021-02-12 15:36:53 -03:00
Matthew Chen
30b960ccea Feature flags for .beta. 2021-02-12 15:36:46 -03:00
Nora Trapp
54a327e269 Don't require cache evacuation to happen on the main thread to avoid deadlocks 2021-02-11 12:13:45 -08:00
Nora Trapp
ad19838ee2 Fix message processing perf tests 2021-02-10 17:13:21 -08:00
Matthew Chen
178711f3ce Feature flags for .qa. 2021-02-05 18:50:31 -03:00
Matthew Chen
f7fbe56b79 Feature flags for .beta. 2021-02-05 18:50:02 -03:00
Matthew Chen
75c993549b Feature flags for .production. 2021-02-05 18:39:56 -03:00
Matthew Chen
c72ab49160 Feature flags for .qa. 2021-02-05 18:35:35 -03:00
Matthew Chen
a87dadd8e1 Feature flags for .beta. 2021-02-05 18:35:30 -03:00
Matthew Chen
1b284b393d Feature flags for .production. 2021-02-05 18:10:27 -03:00
Matthew Chen
70c8df3824 Feature flags for .qa. 2021-02-05 17:38:19 -03:00
Matthew Chen
55b0e8a136 Feature flags for .beta. 2021-02-05 17:38:15 -03:00
Matthew Chen
8aa24793c1 Feature flags for .production. 2021-02-05 17:38:07 -03:00
Matthew Chen
8434091ead Respond to CR. 2021-02-05 17:20:52 -03:00
Matthew Chen
d43895bfa3 Respond to CR. 2021-02-05 17:04:04 -03:00
Matthew Chen
3f1dd1c872 Limit profile name component length to 26 glyphs. 2021-02-05 17:02:47 -03:00
Michelle Linington
ebdf67395e Additional PR Feedback
Our stored avatars are still PNG. Fallback to the png content type and
file extension if the underlying data is png.
2021-02-05 11:11:20 -08:00
Michelle Linington
0b8a8bf864 PR Feedback 2021-02-05 11:07:08 -08:00
Michelle Linington
34e0f99cfd Add additional validation group avatars we receive
Strengthens validation requirements for group avatars a user sets. Also,
checks these requirements on avatars we receive.

Introduces a data migration to drop any large group avatars.

This fixes an issue some users were reporting of jetsaming in the share
extension. All group avatars are stored in-memory on TSGroupModel.
Until we have a better strategy for memory management here, we'll want
to keep group avatars small.
2021-02-05 11:07:08 -08:00
Matthew Chen
09147ad10f Fix application of extra headers. 2021-02-05 15:53:47 -03:00
Matthew Chen
2a4c3ace7b Refine handling of "request approve" vs. "member added". 2021-02-05 15:03:42 -03:00
Matthew Chen
d99395299e Rename group change classes. 2021-02-05 09:18:19 -03:00
Matthew Chen
82dd6446d1 Enforce max group name byte length. 2021-02-05 09:18:18 -03:00
Matthew Chen
d20c8f8f4e Feature flags for .qa. 2021-02-04 11:30:31 -03:00
Matthew Chen
1bbd1ce583 Feature flags for .beta. 2021-02-04 11:30:23 -03:00
Matthew Chen
80c2604b10 Respond to CR. 2021-02-04 11:08:59 -03:00
Matthew Chen
856c5ac058 Use OWSURLSession when generating link previews. 2021-02-04 10:57:48 -03:00
Matthew Chen
e359de0aad Merge branch 'release/5.3.3' 2021-02-04 10:57:26 -03:00
Matthew Chen
fe1f6d64f4 Enforce max attachment upload sizes more strictly. 2021-02-04 10:45:12 -03:00
Matthew Chen
cb43be6e60 Enforce max attachment upload sizes more strictly. 2021-02-04 10:45:12 -03:00
Matthew Chen
e171488dd8 Rework app readiness. 2021-02-04 09:55:39 -03:00
Matthew Chen
f7c4f10d69 Rework app readiness. 2021-02-04 09:55:39 -03:00
Matthew Chen
cce7a14e0c Rework app readiness. 2021-02-04 09:55:39 -03:00
Matthew Chen
645bd76bd5 Rework app readiness. 2021-02-04 09:55:39 -03:00
Matthew Chen
d78daae895 Improve handling of missing group change protos. 2021-02-04 09:54:30 -03:00
Matthew Chen
3f3574f3fe Respond to CR. 2021-02-03 09:47:34 -03:00
Matthew Chen
e85e0993aa Disable OWSURLSession caches by default. 2021-02-03 09:42:59 -03:00
Matthew Chen
b636d29ead Add logging around 413 errors. 2021-02-03 09:42:59 -03:00
Matthew Chen
4d9e78c423 Fetch profiles for dropped profiles when opening a thread. 2021-02-03 09:39:58 -03:00
Jordan Rose
f8b1985930 Bump the database schema version 2021-02-02 10:25:56 -08:00
Jordan Rose
dd35454f2c SSK: In Swift code, always use Logger rather than OWSLogger
Logger includes the file/line information; OWSLogger does not.
2021-02-02 10:25:56 -08:00
Jordan Rose
6b334ff7e4 SSK: Begin storing sessions in serialized protobuf form 2021-02-02 10:25:56 -08:00
Jordan Rose
fefe43d91b SSK: Adopt SignalClient.SessionRecord.hasCurrentState 2021-02-02 10:25:56 -08:00
Jordan Rose
27f9d4f62f Don't fail trying to send a null message to an untrusted identity
In this case we have bigger problems than just a broken session, and
the user needs to manually trust the identity again (even if that's
just by sending a message themself)
2021-02-02 10:25:56 -08:00
Matthew Chen
86c70f6025 Feature flags for .qa. 2021-01-29 17:28:43 -03:00
Matthew Chen
8f85241753 Feature flags for .beta. 2021-01-29 17:28:36 -03:00
Matthew Chen
9c961b98b2 Fix accessibility in chat history items. 2021-01-29 16:43:02 -03:00
Matthew Chen
6c578e816f Improve internal logging around manual migrations. 2021-01-29 11:18:13 -03:00
Jordan Rose
7fc6b2ef7f SSK: propagate untrusted identity errors when ensuring sessions
Regression introduced in "Use SignalClient for message encryption"
2021-01-28 12:03:50 -08:00
Jordan Rose
e595090046 Rename SSKSessionStore.containsSession() to containsActiveSession() 2021-01-28 12:03:50 -08: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
4a86e60b82 SSKSessionStore: fix containsSession to check for an /active/ session
This is how it's being used: not just that you've /ever/ had a session
with a contact/device, but that you /currently/ have a session with
them.
2021-01-28 12:03:50 -08:00
Jordan Rose
f88e8e0838 SSKSessionStore: Only use AxolotlKit types when talking to the db
This puts up the facade for the future we'll eventually want: the
database contains serialized protobuf data, not AxolotlKit
SessionRecord objects. This also allows us to transparently handle
fetches when the database can contain *either* SessionRecords or
serialized data---we only need to check which we have.
2021-01-28 12:03:50 -08:00
Jordan Rose
05725078f1 SSK: Migrate SSKSessionStore to Swift
This is a no-change migration /except/ that I've dropped entry points
that are unused in the app or tests.
2021-01-28 12:03:50 -08:00
Jordan Rose
77da9dcf16 SSK: Remove -maxSessionSenderChainKeyIndexForAccountId:transaction:
This was the last part of SignalServiceKit that poked inside
AxolotlKit's SessionRecord, and SignalClient doesn't currently expose
the same information. However, it was only being used as a heuristic
for merging phone number and UUID contacts when you already had a
session with each, and this just won't happen anymore except in rare
circumstances. (Specifically, all messages will have UUIDs, so a UUID
contact is always more up to date.)
2021-01-28 12:03:50 -08:00
Jordan Rose
e435532474 SSK: Use SignalClient for session archive operations
For now, this means some extra translation between AxolotlKit and
SignalClient types, but it helps pave the way for lazily migrating the
database to store protobuf-serialized records instead of
NSCoding-archived ones.
2021-01-28 12:03:50 -08:00
Jordan Rose
d75ac75546 SSK: Account for reset sessions in SignalClient/AxolotlKit migration 2021-01-28 12:03:50 -08:00
Jordan Rose
2a8206b7dd SSK: Fix session migration for absent pre-key IDs
Doing this correctly means going "back" to proto2 for SessionRecords,
because we need to distinguish between "0" and "absent" in the
serialized protobuf data. (Note that we can do this independently of
SignalClient properly making this distinction because the proto3
implementation we're using, prost, will omit scalar proto3 fields
whose values match their defaults.)
2021-01-28 12:03:50 -08:00
Jordan Rose
45e888826a SSK: Clean up uses of SignalClient now that EC*Key uses SignalClient 2021-01-28 12:03:50 -08:00
Jordan Rose
2b9aeb300e Transition OWSMessageDecrypter to SignalClient
This is the last bit of code that uses AxolotlKit.SessionCipher!
2021-01-28 12:03:50 -08:00
Jordan Rose
645cefcd47 Accomodate differences in UUID formatting checking cert validity 2021-01-28 12:03:50 -08:00
Jordan Rose
ebaf8c2238 Update for SignalClient.StoreContext 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
faccd52d93 SSK: Remove workaround from before Curve25519Kit adopted 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
4219c597b9 Fix inverted check (== instead of !=) 2021-01-28 12:03:50 -08:00
Jordan Rose
f8c2b764a2 Update for the removal of SMKEnvironment 2021-01-28 12:03:50 -08:00
Jordan Rose
833bff8889 Use SignalClient for message encryption
And update for SMKSecretSessionCipher's adoption of SignalClient as
well.
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
77257beacc Implement AxolotlKit<->SignalClient SessionRecord migration
This is accomplished by serializing into and out of the protobuf
format used by SignalClient.
2021-01-28 12:03:50 -08:00
Jordan Rose
1c77cc381c SSK: Use a named constant for provisioning cipher info data 2021-01-28 12:03:49 -08:00
Jordan Rose
afcfff317f SSK: Convert OWSProvisioningCipher to Swift for SignalClient HKDF 2021-01-28 12:03:49 -08:00
Jordan Rose
f7198339ab SSK: Move RemoteAttestation HKDF use to Swift/SignalClient 2021-01-28 12:03:49 -08:00
Jordan Rose
c620707091 SSK: Switch from HKDFKit to SignalClient.hkdf(...) in Swift sources 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
f1b6c93903 Improve "group update info message" copy when joining group via group link. 2021-01-28 11:34:17 -03:00
Matthew Chen
671272d56f Merge branch 'release/5.3.2' 2021-01-27 16:56:19 -03:00
Matthew Chen
6c5167606e Feature flags for .qa. 2021-01-27 16:42:43 -03:00
Matthew Chen
caf7ff266c Feature flags for .production. 2021-01-27 16:42:34 -03:00
Matthew Chen
a727ed9db3 Feature flags for .beta. 2021-01-27 16:42:14 -03:00
Matthew Chen
99034619be Fix rare crash around downloading quoted thumbnails. 2021-01-27 14:19:21 -03:00
Matthew Chen
90df86ba7a Protect oversize text messages from auto-download settings. 2021-01-27 11:35:10 -03:00
Matthew Chen
d2e6058ef6 Fix "empty snippet" issue in conversation list view. 2021-01-27 10:08:49 -03:00
Matthew Chen
57b7461848 Fix "empty snippet" issue in conversation list view. 2021-01-27 09:59:04 -03:00