Commit Graph

1272 Commits

Author SHA1 Message Date
Matthew Chen
b7e9bd906d Batch processing of synced contacts. 2021-02-24 21:13:25 -03:00
Nora Trapp
5f8f048202 Fix tests 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
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
645bd76bd5 Rework app readiness. 2021-02-04 09:55:39 -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
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
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
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
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
Matthew Chen
57b7461848 Fix "empty snippet" issue in conversation list view. 2021-01-27 09:59:04 -03:00
Matthew Chen
5a1d4488ec Respond to CR. 2021-01-27 09:58:17 -03:00
Matthew Chen
7327002125 Create a new GRDB storage adapter after grdb schema migrations. 2021-01-27 09:45:12 -03:00
Matthew Chen
1be46d20bd Create a new GRDB storage adapter after grdb schema migrations. 2021-01-27 09:45:12 -03:00
Matthew Chen
d82b6f8250 Create a new GRDB storage adapter after grdb schema migrations. 2021-01-27 09:45:12 -03:00
Matthew Chen
584a638993 Create a new GRDB storage adapter after grdb schema migrations. 2021-01-27 09:45:12 -03:00
Nora Trapp
35db1c05a5 Add privacy setting to disable sharing suggestions 2021-01-21 20:00:52 -08:00
Matthew Chen
2fd7da2265 Fix GRDB schema migration. 2021-01-21 22:31:09 -03:00
Matthew Chen
d3eb77d6d3 Refine handling of unverified safety number changes. 2021-01-21 22:31:08 -03:00
Matthew Chen
e77861ddbb Fix race in model read cache. 2021-01-21 20:36:47 -03:00
Jordan Rose
7748420b82 SSK: (re-)unify the decision of whether to notify for an interaction 2021-01-19 11:24:14 -08:00
Jordan Rose
f5a3b53e54 SSK: Don't notify / mark unread for people leaving the group 2021-01-19 11:18:10 -08:00
Matthew Chen
3bb5f0777b Add profile bio fields to database schema. 2021-01-14 22:25:45 -03:00
Matthew Chen
c0c6683c61 Merge branch 'release/5.1.0' 2021-01-07 16:44:04 -03:00
Matthew Chen
b64503cce2 Clean up. 2021-01-07 14:18:50 -03:00
Matthew Chen
83ee5636b4 Surface group updates exception group migrations in the inbox snippet. 2021-01-07 14:18:50 -03:00
Matthew Chen
12a61511ab Merge remote-tracking branch 'private/release/5.1.0' 2021-01-04 22:54:46 -03:00
Matthew Chen
f7ec15b808 Refine query filtering. 2020-12-23 18:14:32 -03:00
Nora Trapp
a0992b9857 Eliminate usage of unsaved SignalRecipients 2020-12-18 19:15:07 -08:00
Matthew Chen
4ba64c78af Fix "mark as read" for early read receipts. 2020-12-15 11:15:24 -03:00
Matthew Chen
b3f93cdc88 Fix broken tests. 2020-12-11 16:33:38 -03:00
Matthew Chen
111338b59d Rewrite conversation view. 2020-12-10 12:44:13 -03:00
Michelle Linington
8998b1e767 Add eraId to GroupCallUpdate messages
By including eraId in GroupCallUpdate messages, we're able to identify
separate group calls after the fact. Each unique eraId will result in a
new entry in the database, even if the group call has since ended.
2020-11-24 20:59:37 -08:00
Matthew Chen
21b616ede1 Fix group migration edge cases. 2020-11-20 15:32:15 -03:00