Commit Graph

5823 Commits

Author SHA1 Message Date
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