Commit Graph

6749 Commits

Author SHA1 Message Date
Matthew Chen
41eeede3a7 "Feature flags for .qa." 2021-09-08 15:19:02 -03:00
Matthew Chen
c622f7316d "Feature flags for .beta." 2021-09-08 15:18:52 -03:00
Matthew Chen
f8765e3a0e Rework DebouncedEvent. 2021-09-08 15:04:26 -03:00
Matthew Chen
752bd45e2e Streamline publishing of database change events. 2021-09-08 15:04:26 -03:00
Matthew Chen
e5992ad07c Fix "drain queue date" book-keeping. 2021-09-08 14:59:41 -03:00
Matthew Chen
a1cddb7d18 Clean up ahead of PR. 2021-09-08 14:59:41 -03:00
Matthew Chen
c4dbb436e3 Clean up ahead of PR. 2021-09-08 14:59:41 -03:00
Matthew Chen
7fb925e936 Refine background keep alive behavior. 2021-09-08 14:59:41 -03:00
Matthew Chen
3a5f91fbe8 Refine background keep alive behavior. 2021-09-08 14:59:41 -03:00
Matthew Chen
f0e6c6e107 Refine background keep alive behavior. 2021-09-08 14:59:41 -03:00
Matthew Chen
417655de94 Refine background keep alive behavior. 2021-09-08 14:59:41 -03:00
Matthew Chen
c633a5a5f0 Add logic around background keep alive. 2021-09-08 14:59:41 -03:00
Matthew Chen
d8d176e6de Remove OWSWebSocket entirely off main thread. 2021-09-08 14:59:41 -03:00
Matthew Chen
8476e3662e Remove OWSWebSocket entirely off main thread. 2021-09-08 14:59:41 -03:00
Matthew Chen
e58e0680d7 Simplify web socket background state. 2021-09-08 14:59:41 -03:00
Matthew Chen
c8c352b055 Simplify web socket background state. 2021-09-08 14:59:41 -03:00
Matthew Chen
a3c1c27106 Simplify 'background keep alive' behavior in websocket. 2021-09-08 14:59:41 -03:00
Matthew Chen
954400551f Simplify web socket background state. 2021-09-08 14:59:41 -03:00
Matthew Chen
df68b28dbb Clean up ahead of PR. 2021-09-08 14:59:41 -03:00
Matthew Chen
12e5b2a3fa Port OWSWebSocket to Swift. 2021-09-08 14:59:41 -03:00
Nora Trapp
f817c40370 Revert changes around error handling now that when(fulfilled:) works correctly 2021-09-08 09:53:51 -03:00
Matthew Chen
0ca1ac29f5 Fix "no session for transient message" errors. 2021-09-08 09:53:46 -03:00
Michelle Linington
bfa7f42187 Fix typo breaking compilation 2021-09-07 15:54:41 -07:00
Michelle Linington
cb6a09dbad Fix crash where we recursively reacquire lock
The recent Promise changes have changed this behavior. Before, we could
assume that each promise closure was run in an independent context. Now,
with the perf improvements with `asyncIfNecessary`, the guarantee may
not always hold.

In this case, the lock acquired outside of the promise chain continues
to be held inside of the promise chain.
2021-09-07 15:54:41 -07:00
Matthew Chen
4e7fa0e069 Merge branch 'release/5.19.1' 2021-09-07 08:51:57 -03:00
Matthew Chen
2c9e362b64 "Feature flags for .beta." 2021-09-07 08:34:09 -03:00
Matthew Chen
98a6a4bcb2 "Feature flags for .production." 2021-09-07 08:33:47 -03:00
Michelle Linington
0aadc2d0c1 Re-add the CC host to RESTNetworkManager 2021-09-07 08:32:17 -03:00
Michelle Linington
7e6e99074e PR Feedback 2021-09-03 16:11:19 -07:00
Michelle Linington
f204401544 Add additional logging around discarded messages 2021-09-03 16:11:19 -07:00
Michelle Linington
88309e7cc1 Fix various issues with TESTABLE_RELEASE
While running some perf tests on database queries, I was building
against TESTABLE_RELEASE to have things built with optimizations.

I saw some weird behavior:
- Share extension would crash
- No logs would be recorded

I went through and cleaned up some things that appeared incorrect with
how we handled TESTABLE_RELEASE
2021-09-03 16:11:19 -07:00
Michelle Linington
607cdfc748 Fix tests 2021-09-03 14:16:33 -07:00
Michelle Linington
d4cc667f9b Additional strategies to avoid prekey ratelimit
- First, we should skip fetching prekeys for transient messages in our
  advisory call to -ensureSessionsForMessageSend:ignoreErrors:. We
  already skip transient messages in our prekey fetch where errors *do*
  matter, so this additional check should be able to skip the prekey
  fetch as well.

- OWSOutgoingReceiptManager should stop trying to send receipts to
  recipients that are untrusted. This just burns through prekey fetches
  for sends that we know will fail anyway.

- SafetyNumberConfirmationSheet should handle marking a recipient as
  trusted. Callers are hit or miss on whether they actually update the
  verification state.

- These fixes also happen to make SafetyNumberConfirmationSheet
  presentation a bit more reliable. Before, multiple confirmation sheets
  might flash in quick succession. This seems to fix that
2021-09-03 14:16:33 -07:00
Matthew Chen
a1ae473e05 Add logging around missing notifications. 2021-09-03 17:19:59 -03:00
Nora Trapp
cd3460337d Address rebase conflicts 2021-09-03 11:48:06 -07:00
Nora Trapp
2814ab7629 Convert to new Promise library 2021-09-03 11:41:34 -07:00
Matthew Chen
2b502ad609 Elaborate logging around missing notifications. 2021-09-02 22:51:26 -03:00
Matthew Chen
245ca9d33f Merge branch 'release/5.19.0' 2021-09-02 20:49:03 -03:00
Matthew Chen
390225b78e "Feature flags for .beta." 2021-09-02 20:47:04 -03:00
Matthew Chen
ad8e295fc2 "Feature flags for .production." 2021-09-02 20:46:57 -03:00
Michelle Linington
72fa24e148 Fixes a bug with initial prekey decryption 2021-09-02 13:41:20 -07:00
Matthew Chen
824463606c "Feature flags for .beta." 2021-09-01 17:55:46 -03:00
Matthew Chen
2de24fe590 "Feature flags for .production." 2021-09-01 17:55:37 -03:00
Matthew Chen
29de97ee43 Merge branch 'release/5.19.0' 2021-09-01 17:52:39 -03:00
Matthew Chen
c1f88e8f36 "Feature flags for .beta." 2021-09-01 17:49:49 -03:00
Matthew Chen
eec3e8eafa "Feature flags for .production." 2021-09-01 17:49:34 -03:00
Michelle Linington
5093871fe7 Update opaque call message
RingRTC will now vend the urgency of an incoming opaque call message. We
can use this to determine whether or not we want the NSE to wake the
main app.
2021-09-01 12:51:39 -07:00
Michelle Linington
fda1c8d07a Update KBS staging serviceIDs 2021-09-01 12:43:14 -07:00
Michelle Linington
b1ad6262fd Removed unrelated log line update 2021-09-01 12:39:50 -07:00
Michelle Linington
7ceb485619 PR Feedback v2
Removed the extra -loadSessionIfExists method. I was concerned that we
might need to perform SignalRecipient lookups and updates in certain
cases. Nora assured me that it should be safe to always call the
read-only OWSAccountIdFinder.accountId instead of
OWSAccountIdFinder.ensureAccountId. If we have an entry in the session
store, it must have already an entry in the SignalRecipients database.

In other words, if we fail to fetch an accountId from the
SignalRecipients table, then we know there's never going to be a session
record in the session store.
2021-09-01 12:39:50 -07:00