Commit Graph

78 Commits (597d16f566c1ec3c7b53f6c9c5e12c88a4d79ba9)

Author SHA1 Message Date
Greyson Parrelli 597d16f566 Ensure one row per recipient in getRecipientSettingsForSync().
Technically there's no unique constraint in ThreadDatabase to guarantee
only one thread per recipient. We saw a crash that indicated that one
user has two threads for the same recipient. That's not true for any of
my devices. Still, best to play it safe here while we try to figure out
why this is happening.
2020-10-09 12:16:38 -04:00
Greyson Parrelli 63746bbb47 Add support for syncing forced unread status. 2020-10-07 17:22:05 -04:00
Greyson Parrelli e00397620a Simplify storing storage-service-specific recipient values.
This gives us the ability to separate things we need for the Recipient
class from things we only need for storage syncing.

Not only does this simplify the storage service model building code
(i.e. we no longer need to pass around a set of archived recipients),
but it also eliminates a join on the Identity table for building regular
recipients, which should help perf.
2020-10-07 17:22:05 -04:00
Greyson Parrelli 599cf1e5cb Ensure we refresh recipients after changing storage keys. 2020-10-06 10:32:03 -03:00
Alan Evans 0af264429f
During GV2 storage sync, recover from recipient present but group not present. 2020-09-30 10:11:51 -03:00
Greyson Parrelli f182be2d79 Inline CDS feature flag. 2020-09-23 16:54:38 -04:00
Greyson Parrelli a2c2ab428a Fallback to profile fetches for unlisted contacts. 2020-09-23 16:54:38 -04:00
Alan Evans a05f74d302 Do not set color before profile name is known. 2020-09-23 16:54:38 -04:00
Angus Turnbull 9dbb77c10a Remove some calls to GMS APIs for utility functions.
Fixes #9629
2020-09-23 16:54:38 -04:00
Alan Evans cd2467085e Correct storage query deleted filter argument. 2020-09-23 16:54:38 -04:00
Alan Evans 3cffaddc0a
Validate incoming Group lengths and remote delete entries if wrong.
Ignore incoming messages with bad V1 group lengths.
2020-09-10 14:39:29 -03:00
Alan Evans 2ee04bd1b6
Insert placeholder group on GV2 storage service sync. 2020-09-09 11:59:09 -03:00
Greyson Parrelli ed440a2150 Do not clear UUID for unregistered users.
Otherwise, a number could be unregistered and re-registered by a
different person, assigning a new UUID to an existing RecipientId,
which we never want to do.
2020-09-03 20:23:26 -04:00
Alex Hart c5c2fb31b1 Fix CREATE statement for RecipientDatabase. 2020-08-24 14:25:37 -04:00
Greyson Parrelli 2cf9eb69eb Add support for handling unknown protobuf fields. 2020-08-24 11:16:41 -03:00
Cody Henthorne 724f3e872b Update Mention UI/UX to match latest designs. 2020-08-14 15:54:05 -04:00
Cody Henthorne 761de1318e Update mention data during recipient merge. 2020-08-14 15:54:05 -04:00
Cody Henthorne 02508512d5 Fix incorrect snippet generation by ignoring profile name change messages. 2020-08-14 15:54:05 -04:00
Greyson Parrelli b369b734ca Improve storage service insert recovery. 2020-08-07 19:20:35 -04:00
Cody Henthorne 1634d7d531
Show mention picker immediately after @ entered. 2020-08-07 15:27:15 -04:00
Cody Henthorne d563de4207
Add mention detection to search flows. 2020-08-07 15:18:40 -04:00
Greyson Parrelli 596c4b6e40 Don't include inactive groups when listing groups in common. 2020-08-06 20:57:50 -04:00
Greyson Parrelli 5923fa0cd5 Block sends on CDS lookups. 2020-08-06 20:57:50 -04:00
Cody Henthorne b2d4c5d14b Add mentions for v2 group chats. 2020-08-06 20:57:50 -04:00
Greyson Parrelli 2dcaa21a44 Remove UuidRecipientError. 2020-08-04 19:12:25 -04:00
Greyson Parrelli 1ec3a72f79 Fix issue with thread summaries being updated after message deletion.
Fixes #9902
2020-08-03 10:36:02 -04:00
Alan Evans 8cb9ab3204 Fetch newly found profiles on Groups V2 inline. 2020-07-28 15:20:20 -04:00
Greyson Parrelli 8ce5c4b885 Cleanup naming of RecipientDatabase GLOB search. 2020-07-28 15:19:52 -04:00
Greyson Parrelli 5bf15b0587 Fix casing issues with non-ASCII characters in contact search.
SQLite's case-related stuff is ASCII-only. That means that even though LIKE is supposed to be case-insensitive, it fails when used on non-ASCII characters.

There appears to be no relief in SQLite itself, so I swapped our contact search to use GLOB instead of LIKE and wrote a little thing to convert query strings into a case-insensitive unicode-compatible patterns. Didn't see any noticeable performance difference.
2020-07-22 22:58:21 -04:00
Greyson Parrelli 2a133587cc Add a flag for recipientTrust. 2020-07-21 16:11:45 -04:00
Greyson Parrelli 870cee5707 Remove uuidOnlyContacts feature flag. 2020-07-21 15:31:53 -04:00
Greyson Parrelli 5468f1705c Ensure we refresh attributes if key changes from storage service. 2020-07-19 10:45:20 -04:00
Greyson Parrelli bd078fc883 Handle UUID-only recipients and merging. 2020-07-19 09:32:16 -04:00
Alan Evans fae003e085
Do not sync group v2 recipients that we do not have the master key for. 2020-07-13 11:52:06 -03:00
Greyson Parrelli 5605fde777 Rename the UUID flag to be more explicit. 2020-07-08 16:51:30 -04:00
Greyson Parrelli 2791790bf5 Implement new CDS changes. 2020-07-08 16:51:30 -04:00
Greyson Parrelli c877aba09f Use resolved recipients in the conversation list. 2020-07-08 16:51:30 -04:00
Greyson Parrelli b6b499d865 Refresh recipients outside of a transaction for storage service. 2020-07-08 16:51:30 -04:00
Alan Evans 841ee18435
Add default option to message vibrate for pre API26. 2020-06-19 13:08:54 -03:00
Greyson Parrelli ce940235b0 Optimistically fetch profiles. 2020-06-16 19:30:35 -04:00
Greyson Parrelli d60d67ee7e
Set contact colors more aggressively. 2020-06-10 10:49:22 -04:00
Greyson Parrelli db06cbbc86 Remove unnecessary recipient refreshes. 2020-06-07 19:59:42 -04:00
Greyson Parrelli f270a6b8c4 Fix potential crash by removing an unnecessary column.
The column I removed is already in the recipient half of the projection.
Having two representations of the groupId made reading the groupId out
of the cursor non-deterministic, and when compounded with another bug,
could cause a crash if one of them was null.
2020-06-01 17:43:05 -04:00
Greyson Parrelli f70e41e7cd Don't allow account record updates to delete our profile key. 2020-06-01 17:43:05 -04:00
Alex Hart 558a8e4a14 Add polish to groups v2 creation flow. 2020-05-29 09:51:20 -04:00
Alan Evans befb4939d5 Restore groups from storage service. 2020-05-29 09:51:20 -04:00
Greyson Parrelli d708984abd Require users be a system contact or whitelisted to appear in the contact list. 2020-05-29 09:51:20 -04:00
Alan Evans 11d17f7496 GV2 storage service syncing. 2020-05-29 09:51:20 -04:00
Greyson Parrelli 207c467c6b Don't insert identity verification message for the initial restore. 2020-05-24 13:00:16 -04:00
Greyson Parrelli 23401440bf Prevent insertion of UUID-only contacts at the database level. 2020-05-21 19:56:30 -03:00