Commit Graph

199 Commits

Author SHA1 Message Date
Matthew Chen
14b9ce025b Avoid deadlock in TSAccountManager. 2019-08-30 14:39:45 -03:00
Nora Trapp
129535f2d7 Merge branch 'release/2.42.0' 2019-08-29 15:21:40 -07:00
Nora Trapp
85beb08bde Put message request view behind a feature flag 2019-08-29 10:15:30 -07:00
Matthew Chen
6da987eb3a Remove YDB header usage. 2019-08-29 10:24:27 -03:00
Matthew Chen
aab82a6753 Respond to CR; add a unit test around the "special messages" finder method. 2019-08-26 12:29:43 -03:00
Matthew Chen
203dc7272e Remove YDB usage. 2019-08-26 12:27:42 -03:00
Matthew Chen
f8e5c4f697 Remove YDB usage. 2019-08-26 12:27:42 -03:00
Matthew Chen
7e22d332b1 Remove YDB usage. 2019-08-26 12:27:42 -03:00
Matthew Chen
47b000ec09 Remove YDB usage. 2019-08-22 09:32:00 -03:00
Michael Kirk
926e76270f Merge tag '2.42.0.8' 2019-08-20 09:52:18 -06:00
Michael Kirk
dff1f40af6 Don't show "message request" for de-registered system contacts
Fixes:
Alice installs Signal
Bob sees "Alice is on Signal" notification
(everything is as expected until this point)

Alice uninstalls Signal
Bob sees message request in Alice's conversation
2019-08-19 12:46:14 -06:00
Matthew Chen
85756b0fe9 Merge remote-tracking branch 'private/release/2.42.0' 2019-08-16 13:21:38 -03:00
Matthew Chen
d308c566af Address deadlocks in profile manager. 2019-08-15 16:10:14 -03:00
Michael Kirk
34ba50bd02 broadcast media operation
Only upload once when sending to multiple via the camera first flow
2019-08-15 09:36:57 -06:00
Michael Kirk
b322d1a119 Merge tag '2.42.0.5' 2019-08-13 19:56:57 -06:00
Michael Kirk
bee54d1aea fixup compiler warnings 2019-08-13 16:58:06 -03:00
Michael Kirk
82c99c4003 CR: rename for clarity 2019-08-12 15:11:40 -06:00
Michael Kirk
f3793f0f2a Consolidate OutgoingMessage preparation 2019-08-12 15:11:40 -06:00
Nora Trapp
6c64e94006 Only auto-share profile with empty threads. 2019-08-09 12:59:15 -07:00
Michael Kirk
4dc75aed3d fix warnings 2019-08-09 09:41:59 -06:00
Matthew Chen
eccfad0f46 Merge remote-tracking branch 'private/release/2.41.0' 2019-08-06 12:12:39 -03:00
Matthew Chen
4f03f969fc Rework "view once" messages. 2019-08-01 16:13:37 -03:00
Nora Trapp
cfb5468b2c Don't force profiles for existing conversations until phone number privacy rolls out 2019-07-31 13:17:37 -07:00
Matthew Chen
de56fec16b Remove usage of primary storage. 2019-07-29 17:25:58 -03:00
Nora Trapp
2cfa9f68ca Add the thread to the profile whitelist anytime we send a message. 2019-07-29 12:40:09 -07:00
Nora Trapp
aedde9fde8 Remove profile banners 2019-07-29 12:40:09 -07:00
Nora Trapp
81783c253a Remove Contacts Offer 2019-07-29 12:40:09 -07:00
Matthew Chen
a3f3b164d4 Remove YDB connections. 2019-07-24 16:12:13 -03:00
Matthew Chen
ebd45743c6 Convert interactions to BaseModel. Add typed 'any update with...' methods. 2019-07-18 15:44:36 -03:00
Nora Trapp
a323ff4ddf No more transitional_phoneNumber 2019-07-11 10:52:13 -07:00
Nora Trapp
9105b81e9a Replace a bunch of usages of localNumber with localAddress 2019-07-11 10:52:13 -07:00
Nora Trapp
ae17d61a05 Update quoted messages, per message expiration, and sync transcripts 2019-07-10 13:31:18 -07:00
Nora Trapp
a1f85fca30 Migrate profiles to support UUIDs 2019-07-02 11:19:50 -07:00
Michael Kirk
0c944fe9f4 Incoming message has authorAddress 2019-06-27 14:22:13 -06:00
Matthew Chen
c8359fc932 Convert message sending to use any transactions. 2019-06-25 16:00:58 -04:00
Matthew Chen
b86ab9f611 Migrate OWSDisappearingMessagesConfiguration to any. 2019-06-25 15:48:37 -04:00
Matthew Chen
e26a8e1bd4 Convert attachments to be any-only. 2019-06-24 15:34:02 -04:00
Michael Kirk
440f9458e2 Fix loss of precision compiler warnings 2019-06-19 10:13:22 -06:00
Matthew Chen
3d59ac0992 Rework camera flow for one-off disappearing messages. 2019-06-17 11:17:52 -04:00
Matthew Chen
a62376b3f9 Remove sendingMediaWithOversizeText feature flag. 2019-06-17 11:17:52 -04:00
Matthew Chen
97cfb32d29 Rework camera flow for one-off disappearing messages. 2019-06-17 11:17:52 -04:00
Matthew Chen
b8327ad7c8 Respond to CR. 2019-05-31 12:39:50 -04:00
Matthew Chen
af3e6187fc Add per-message expiration to models (code generated changes).
Add per-message expiration to models.

DRY up incoming message creation.
2019-05-31 12:39:50 -04:00
Matthew Chen
6e32c9a79f Remove "ephemeral media" model changes. 2019-05-29 11:53:42 -04:00
Michael Kirk
a837c75764 Simple send sans Yap 2019-05-28 17:31:53 -04:00
Matthew Chen
745a384d7c Respond to CR. 2019-05-20 17:18:54 -04:00
Matthew Chen
a6629bfe63 Add EphemeralMedia model classes. 2019-05-20 17:05:49 -04:00
Michael Kirk
ecb6c275f8 MessageSender API takes AnyTransaction 2019-05-14 10:44:55 -06:00
Michael Kirk
aa37cdbadd GRDB: Avoid assert when missing dynamic interactions
Triggered whenever entering a conversation
2019-05-13 12:48:45 -04:00
Matthew Chen
246131ebbd Fix "set unread" deadlock. 2019-05-09 13:39:23 -04:00
Matthew Chen
a81acfa788 Apply asAnyRead/Write convenience methods. 2019-04-30 10:11:19 -04:00
Matthew Chen
783858ea52 Remove extra semicolons. 2019-04-30 09:39:04 -04:00
Matthew Chen
4a57db7b0b Respond to CR. 2019-04-26 15:22:48 -04:00
Matthew Chen
a766f1e944 Send stickers. 2019-04-26 12:34:56 -04:00
Matthew Chen
dec4513f46 Send stickers. 2019-04-26 12:34:56 -04:00
Matthew Chen
c229f39012 Add sticker sync messages. 2019-04-22 10:26:09 -04:00
Matthew Chen
509bc57401 Update proto schema to reflect stickers. Sketch out the Sticker model classes. 2019-04-18 10:12:17 -04:00
Matthew Chen
f5c04f3801 Respond to CR. 2019-04-16 09:08:45 -04:00
Michael Kirk
870caaa84a simplify completion checking - make nonnull 2019-02-26 10:06:52 -07:00
Michael Kirk
13154fb828 allow long text with non-durable sends (SAE) 2019-02-26 10:06:52 -07:00
Matthew Chen
56e5feca46 Introduce ConversationSnapshot. 2019-02-26 10:55:44 -05:00
Michael Kirk
f1623b6037 missing nullability text 2019-02-25 13:27:49 -07:00
Michael Kirk
7e5256856c render media+longText message 2019-02-25 13:27:49 -07:00
Michael Kirk
b7989e9384 feature flag approval sending 2019-02-25 13:27:49 -07:00
Michael Kirk
bc4260b444 Send long-text with other attachments 2019-02-25 13:27:49 -07:00
Michael Kirk
a218d6c465 Send first chars of longtext in protobuf 2019-02-25 13:27:49 -07:00
Matthew Chen
3d757b492a Add link previews to conversation message bubbles. 2019-01-23 09:32:30 -05:00
Matthew Chen
2dcc79fbca Fix issues around link previews. 2019-01-22 10:15:50 -05:00
Matthew Chen
8e44bf554c Respond to CR. 2019-01-22 09:42:25 -05:00
Matthew Chen
d775a70a89 Build link previews. 2019-01-22 09:42:25 -05:00
Matthew Chen
31ea64bdaf Build link previews. 2019-01-22 09:42:25 -05:00
Matthew Chen
a477e01a4a Apply LinkPreview model. 2019-01-14 16:20:54 -05:00
Michael Kirk
af7ee5e1d1 address compiler breakage after rebase 2018-12-19 15:16:36 -07:00
Michael Kirk
5671fd2520 Revert "Revert 'new sort id'."
This reverts commit ebae75af00.
2018-12-19 15:16:36 -07:00
Matthew Chen
bd40aacd53 Purge dynamic interactions from database. 2018-12-18 10:55:54 -05:00
Michael Kirk
6232b1ef67 CR: add debug asserts 2018-12-17 14:43:50 -07:00
Michael Kirk
81bc357bbb more robust handling of unsaved outgoing messages 2018-12-17 14:43:50 -07:00
Michael Kirk
668cc22af3 Perf: Insert outgoing message into conversation before save completes.
This was a huge savings - e.g. 50-70% of the time between tapping send and
rendering the message takes place in the save/postWriteTransaction blocks
2018-12-17 14:43:50 -07:00
Matthew Chen
19a2bfeaad More conversation viewmodel perf improvements. 2018-12-13 11:50:55 -05:00
Matthew Chen
fea40d571c Move contact offers to Conversation view model. 2018-12-13 09:12:41 -05:00
Michael Kirk
c0cb7df10a rename hasEverHadMessage -> shouldThreadBeVisible 2018-12-12 08:46:15 -07:00
Michael Kirk
1a5c47df2f Fix SAE, limit max attachments 2018-12-05 13:56:34 -05:00
Matthew Chen
aeadea67e2 Send multiple attachments from the share extension. 2018-11-13 13:15:54 -05:00
Matthew Chen
7f89c90f16 Fix bug when sending non-body attachments (e.g. group avatars). 2018-11-13 13:15:11 -05:00
Michael Kirk
27cb91e9c8 Plumb through messageAlbumId so an Attachment knows what album (if any) it
belongs to.
2018-11-08 12:52:08 -06:00
Matthew Chen
60c5a84dd2 Fix issues in media gallery cells; Improve debug galleries. 2018-11-07 09:56:49 -05:00
Matthew Chen
c7d427029b Respond to CR. 2018-11-02 13:17:36 -04:00
Matthew Chen
f6591fac25 Add debug UI for multi-image sends. 2018-11-02 13:04:05 -04:00
Matthew Chen
d04f1e6e36 Add debug UI for multi-image sends. 2018-11-02 13:04:05 -04:00
Matthew Chen
40aa78e001 Merge remote-tracking branch 'origin/release/2.31.0' 2018-10-31 11:42:41 -04:00
Michael Kirk
cb9aa6304c find -E . -type f -regex ".*\.(m|h)" -exec sed -i "" -e "s/try_/throws_/" {} \; 2018-10-30 11:35:34 -06:00
Michael Kirk
3a6aafc454 Swift Exception wrap NSData+keyVersionByte 2018-10-30 11:35:34 -06:00
Michael Kirk
3560f3be5c Durable send operation
TODO
-[x] respect order of queue
-[x] replacements
  -[x] those w/o completion handler
  -[x] basic send+log operation persists
  -[x] send+ui completion
  -[x] share extension
  -[x] update state jobs
-[x] App Lifecyle
  -[x] settable
  -[x] Mark as ready on startup
  -[x] Fail appropriate jobs on startup

NICE TO HAVE
-[x] concurrent per senders
-[ ] longer retry (e.g. 24hrs)
-[ ] App Lifecyle
  -[x] retry failed jobs on startup?
  -[ ] reachability

DONE
-[x] basic passing test
-[x] datamodel
-[x] queue/classes
2018-10-25 11:54:59 -06:00
Matthew Chen
0125535d4d Pull out SignalCoreKit. 2018-10-01 09:06:40 -04:00
Matthew Chen
ebae75af00 Revert 'new sort id'. 2018-09-27 19:40:51 -04:00
Michael Kirk
c2f87c738a trivial replace of timestampForSorting -> sortId in some logging 2018-09-26 09:52:34 -06:00
Michael Kirk
6f8eddc955 unread indicator uses sortId
- removed timestamp parameter. This wasn't totally obvious, previously we were tracking two pieces of state

1. `unreadIndicator.firstUnseenTimestamp`:
    the first unseen timestamp for a conversation that exists in the database
2. `unreadIndicator.timestamp`:
    the timestamp of the first interaction *after* the unread indicator that fits in the loading window

We don't actually need to track `2` because it was only used in a comparison like:

   viewItem.interaction.timestampForSorting >= unreadIndicator.timestamp

But by definition, unreadIndicator.firstUnseenTimestamp is always less than or
equal to unreadIndicator.timestamp. Put into terms of the `sortId` corallary,
the sortId of the first unseen interaction in the database is always less than
or equal to the sortId of the first unseen interaction that fits in the loading
window.

In other words, there's no situation where

   viewItem.interaction.sortId >= unreadIndicator.firstUnseenSortId
2018-09-26 09:52:34 -06:00
Michael Kirk
ab55e85304 step 1: timestampForSorting audit, change signature
No change in functionality in this commit, I just broke the signature to have a
systematic audit of the callsites. Added TODO's with the plan for each call.
2018-09-26 09:52:33 -06:00
Michael Kirk
df61316495 minimize diff senderTimestamp -> timestamp 2018-09-26 09:52:33 -06:00
Michael Kirk
00d0d1e002 Remove legacy Error backdating - no changes in functionality
Historically we would backdate the SN change messages, but since adopting
non-blocking SN changes long ago, they're already sorted properly by creation
time, so backdating has been unnecessary for a while.

I also audited that all other error messages are saved directly after creation.

I applied deprecation attributes as appropriate as I audited.
2018-09-26 09:52:33 -06:00