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
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.
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.
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