Commit Graph

78 Commits

Author SHA1 Message Date
nielsandriesse 4f3544c1fc Integrate transaction handling utility part 3 2020-06-11 13:25:48 +10:00
nielsandriesse eab26c504c Fix build 2020-06-05 13:43:06 +10:00
nielsandriesse 74bbe067d8 Update Pods 2020-06-05 10:38:44 +10:00
nielsandriesse 4098b9638c Untangle receipts, transcripts & typing indicators logic 2020-04-30 12:23:07 +10:00
nielsandriesse 1351250c92 Split things according to architecture overview docs 2020-04-24 10:22:55 +10:00
nielsandriesse ceb33e36e4 Separate out remaining bits of Session logic 2020-04-23 16:02:36 +10:00
Niels Andriesse 41484c2910 WIP 2019-11-14 11:34:03 +11:00
Niels Andriesse d32b45f792 Clean 2019-08-23 16:14:19 +10:00
Mikunj d7ada75660 Fix date not being parsed properly.
Fix message indicators on groups.
Fix receipts being sent in groups.
2019-08-23 10:27:22 +10:00
Michael Kirk 21cffdfb5e always specify default when accessing bool preference 2019-04-10 14:32:53 -06:00
Michael Kirk 5671fd2520 Revert "Revert 'new sort id'."
This reverts commit ebae75af00.
2018-12-19 15:16:36 -07:00
Matthew Chen 19a2bfeaad More conversation viewmodel perf improvements. 2018-12-13 11:50:55 -05:00
Michael Kirk 0d0359ee12 Fix crash due to empty authorId on old messages 2018-11-19 13:01:24 -06:00
Matthew Chen eb2e16872e Distinguish 'app will/did become ready' events. 2018-11-05 09:04:57 -05: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 275414cbda Respond to CR. 2018-10-16 17:42:54 -04:00
Matthew Chen 7c1f1882d8 Sync "show UD indicators" setting. 2018-10-16 17:42:54 -04:00
Michael Kirk 3e85c8c023 clang-format branch changes 2018-10-12 13:52:46 -04:00
Matthew Chen b53cb9e616 Clean up ahead of PR. 2018-10-12 13:52:46 -04:00
Matthew Chen 5cf8909a28 Modify OWSOutgoingReceiptManager to handle read receipts. 2018-10-12 13:52:46 -04:00
Matthew Chen 13373db3bc Send delivery receipts. 2018-10-12 13:52:46 -04: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 90aa593dcd sortId vs. Read status 2018-09-26 09:52:33 -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 eef1368ad3 Timestamp audit step1: change signature
There is no change in functionality in this commit.

Apart from clarifying what the timestamp means (it's the timestamp of the
*sender*), this intentionally breaks all the call sites, so I could have a sane
way to thoroughly audit wherever we're passing in timestamps, to see where
we're depending on them to affect sort order.

For the sake of a cleaner diff of meaningful changes, instead of "fixing"
everything in this commit, I've just added comments and renamed signatures.
2018-09-26 09:52:33 -06:00
Matthew Chen e1db60c1c0 Rework creation of singletons. 2018-09-19 15:11:26 -04:00
Matthew Chen 3a12446be8 Modify environment accessors to use our 'shared' convention. 2018-09-07 16:20:41 -04:00
Matthew Chen bd05cdc031 Rename TextSecureKitEnv to SSKEnvironment. 2018-09-07 16:19:00 -04:00
Michael Kirk c7662b5a86 Step 2/2 %s/OWSAssert/OWSAssertDebug for existing previous assert semantics
Going forward, we want to prefer safer asserts, but we don't want to blindly
apply crashing asserts across the codebase
2018-09-07 10:00:48 -06:00
Matthew Chen f473f60111 Apply OWS log functions in Objective-C. 2018-08-27 12:58:52 -04:00
Matthew Chen cc5a480baa Apply OWS log functions in Objective-C. 2018-08-27 12:58:52 -04:00
Matthew Chen 03829779cc Apply OWS log functions in Objective-C. 2018-08-27 12:58:52 -04:00
Matthew Chen 3a50377902 Apply OWS log functions in Objective-C. 2018-08-27 12:58:52 -04:00
Matthew Chen 713606271c Rename fail macros in Obj-C. 2018-08-27 10:29:51 -04:00
Michael Kirk c05700fd98 Log in OWSFail
step 1: rename OWSFail->OWSFailNoProdLog
step 2: rename OWSProdLogAndFail->OWSFail
step 3: Convert OWSFailNoProdLog->OWSFail where we want logging
step 4: Rename OWSCFail->OWSCFailNoProdLog
step 5: Rename OWSProdLogAndCFail -> OWSCFail
step 6: Convert OWSCFailNoProdLog -> OWSCFail where we want logging
2018-08-09 15:30:19 -06:00
Matthew Chen ab31e5a07f Code generate Swift wrappers for protocol buffers. 2018-08-03 14:05:20 -04:00
Michael Kirk d591fb7f2c Fix some compiler warnings 2018-07-17 19:22:58 -06:00
Michael Kirk 74b741e9de Update timer
// FREEBIE
2018-06-14 15:18:42 -04:00
Michael Kirk a10ae1835e respond to code review
// FREEBIE
2018-05-07 12:51:55 -04:00
Michael Kirk c88ce07f66 CR: Clean up comments, use property setter instead of ivar
// FREEBIE
2018-04-18 15:32:01 -04:00
Michael Kirk 754549adf1 Start timer for expiring message based on when read receipt was sent
// FREEBIE
2018-04-18 15:32:01 -04:00
Michael Kirk dfb2a034af Use explicit transactions.
- Start expiration within scope of existing transaction when we're
  already in a transaction

// FREEBIE
2018-04-18 15:32:01 -04:00
Matthew Chen d6f4db1523 Rename TSStorageManager to OWSPrimaryStorage. 2018-03-06 17:12:13 -03:00
Matthew Chen ad78b1ea53 Convert duplicate timestamp fail to log. 2018-02-26 14:45:32 -05:00
Michael Kirk b79244affa Don't enqueue sender read receipts from self-sent messages
These messages are always already read.

Reminder, there are two types of read receipts:

1. One informs our linked devices that we've read a message on another
device.
2. The other informs the sender that we've read their message.

This change is about the latter, we'll continue to send the former to
ourself.

The proximate cause for this change was a failing assert in
OWSMessageSender#handleSendToMyself:(TSOutgoingMessage *)outgoingMessage

The assert was failing because we were sending a message to ourself
which had no body or attachment (the sender-read receipt). Rather than
filtering them out from the message sender, we should never ask the
message sender to do nonsense work (send a senderReadReceipt to ourself)

// FREEBIE
2018-02-23 13:50:40 -05:00
Matthew Chen b7958262ba Respond to CR. 2018-02-14 16:06:47 -05:00
Matthew Chen 6f28c75257 Fix glitch in batch processing of incoming messages. 2018-02-14 14:56:47 -05:00
Matthew Chen a30170b3b2 Prefer "app is ready" flag to "storage is ready" flag. 2018-01-30 11:34:00 -05:00