Commit Graph

982 Commits

Author SHA1 Message Date
Michelle Linington
417c135fc9 Lint 2021-10-04 09:53:36 -03:00
Michelle Linington
ccf9383533 Improvements to database swap flow
Added a bunch of comments clarifying the database swap requirements.
Also, removed the baseDir parameter from GRDBDatabaseStorageAdapter.
2021-10-04 09:53:36 -03:00
Michelle Linington
fdc983519a Dynaically update database location at runtime
Fixes an issue where users were no longer receiving messages after
restoration. During restoration, the restoring device copies the
transferred database files to a special "hotswap" directory since we
don't want to overwrite our currently in-use database. Once finished, it
re-opens the database pointing to our hotswap directory. It would then
move the hotswap database to its primary location on the next app
launch.

The problem here is our extensions don't know how to read the hotswap
directory. Even if we added that capability, it's going to be tricky to
coordinate which database they read and when as the main app shuffles
files around.

This fix adjusts our restoration flow. Instead of having a special
"primary" and "hotswap" directory that we need to fix up on the next
launch, we instead record a UserDefaults entry that points to our
current database directory.

Once transfer has completed, the main app only needs to update the
current database directory in UserDefaults. No post-launch swapping
needs to occur.

Extensions will listen for updates to this database location by
registering KVO on NSUserDefaults.

This change also adjusts the restoration flow to break it up into
discrete stages. The motivation here is we need to make sure that a
partial restoration doesn't put the extensions in an inconsistent state.
2021-10-04 09:53:35 -03:00
Michelle Linington
a452ed3061 Wait for RingRTC before we finish handling VoIP push 2021-09-24 18:36:35 -07:00
Matthew Chen
692c637e80 Handle certain call messages sync. 2021-09-22 12:11:09 -07:00
Michelle Linington
0a69803b96 Restore NSE+main call message handoff 2021-09-22 11:23:14 -07:00
Michelle Linington
48435eb05d NSE should bail whenever it wakes the main app
We've observed races between the NSE+app handoff that can cause a
message to be decrypted twice. This works around this by quitting the
NSE if we decide to wake the main app. This isn't a good fix, but it
should address these out-of-sync session issues for now.
2021-09-21 18:44:00 -07:00
Matthew Chen
1fa8fef610 Streamline websocket requests. 2021-09-09 14:41:38 -03:00
Nora Trapp
0ab3b63016 Log message send benchmarks in production 2021-09-08 21:41:13 -03:00
Matthew Chen
f29922b9af Refine message send milestones. 2021-09-08 21:41:13 -03:00
Matthew Chen
5de4cb26c5 Refine message send bench milestones. 2021-09-08 21:41:13 -03:00
Matthew Chen
5e7636ec62 Add metrics around rendering message sends. 2021-09-08 21:41:13 -03:00
Matthew Chen
ed82d2b74a Update l10n strings. 2021-09-08 15:08:20 -03:00
Matthew Chen
7ae7510c47 Improve perf of CVC date math. 2021-09-08 15:04:26 -03:00
Nora Trapp
2814ab7629 Convert to new Promise library 2021-09-03 11:41:34 -07:00
Matthew Chen
c1a8005a74 Never emit invalid e164 in storage service contact records; be robust to invalid e164 incoming protos. 2021-09-01 16:33:16 -03:00
Matthew Chen
2005be536b Update date header and message footer date formatting. 2021-09-01 09:34:30 -03:00
Matthew Chen
9fd3b274e7 Respond to CR. 2021-08-30 17:15:56 -03:00
Matthew Chen
ca3f83ba98 Fix crash when scanning QR codes. 2021-08-30 17:15:55 -03:00
Eugene Bistolas
77854791ec iOS 15: Notifications generated via NSE show failover images, notifications fail to post 2021-08-30 07:07:04 -10:00
Matthew Chen
0957a5df49 Merge branch 'release/5.19.0' 2021-08-27 22:15:56 -03:00
Michelle Linington
8de3b76ee9 There are two types of File Not Found errors we can ignore 2021-08-27 14:26:10 -07:00
Nora Trapp
15cb0a5730 Add benchmarks around various message sending milestones 2021-08-27 12:55:57 -07:00
Eugene Bistolas
de67f4cede Update NSE avatar size, add more logging 2021-08-26 09:47:12 -10:00
Eugene Bistolas
e1c43e3583 Additional logging for prod NSE avatar generation 2021-08-25 14:24:19 -10:00
Matthew Chen
617a8b3acd Fix message forwarding issues. 2021-08-25 11:04:13 -03:00
Matthew Chen
5348c1a8c7 Clean up remote config and feature flags. 2021-08-24 20:39:26 -03:00
Matthew Chen
de7b0e0a21 Disable file logging in tests. 2021-08-24 18:32:23 -03:00
Matthew Chen
3485c230bd Revise app versioning scheme. 2021-08-23 18:23:50 -03:00
Matthew Chen
93d9c15073 Revise app versioning scheme. 2021-08-23 18:23:49 -03:00
Matthew Chen
98e3bd81a0 Leverage pre-cached avatars. 2021-08-23 18:20:42 -03:00
Matthew Chen
bf6681f68d Leverage pre-cached avatars. 2021-08-23 18:20:42 -03:00
Matthew Chen
25cafca584 Refine selection UI appearance. 2021-08-19 17:07:15 -03:00
Matthew Chen
ae0b4d59a2 Modify forward flow multi-forward. 2021-08-19 16:57:01 -03:00
Matthew Chen
2c1f0c1c30 Elaborate local profile avatar logging. 2021-08-19 14:39:04 -03:00
Eugene Bistolas
c70817eb1c Group call avatars incorrectly configured, ensure incoming donations do not occur for correct notification settings 2021-08-18 13:26:24 -10:00
Nora Trapp
d889aff8f3 Fix linting issues 2021-08-18 16:12:31 -07:00
Akash Mudubagilu
d1e8d32930 shouldAllowLinkification now uses caseInsensitive regex when looking for host 2021-08-18 16:02:09 -07:00
Eugene Bistolas
e166caa1de iOS 15 Notification Action Glyph Support 2021-08-18 08:29:53 -10:00
Matthew Chen
b28131de13 Refine error localizedDescription. 2021-08-18 15:01:03 -03:00
Matthew Chen
fcdca12cf5 Deprecate REST, Part 1
* Port socket manager to Swift.
* Clean up HTTP request success/failure state & errors.
* Rework network manager.
* Rework HTTP errors.
* Rework errors "properties": isRetryable, etc.
* Fix test breakage.
2021-08-18 14:25:36 -03:00
Eugene Bistolas
bd645b3048 iOS 15 communication notification support for calls 2021-08-17 13:19:14 -10:00
Eugene Bistolas
c266385eb4 Review feedback 2021-08-17 12:02:42 -10:00
Eugene Bistolas
a4c3bb9c90 iOS 15 communication notification support for messages 2021-08-17 10:48:39 -10:00
Nora Trapp
65ff51acb4 Send all messages via MessageSenderJobQueue 2021-08-16 13:27:43 -07:00
Michelle Linington
a2deaf1cae Tweak our log stripper to not strip timestamps
The new hex stripper is a bit too aggressive and will strip out
timestamps as well. Adjusting the minimum number of bytes from 6 to 7
buys us a couple hundred years.

Initial: "timestamp: 1628539368550"
Before:  "timestamp: [ REDACTED_HEX:...550 ]"
After:   "timestamp: 1628539368550"
2021-08-12 19:20:06 -07:00
Matthew Chen
f610642519 Scrub all long hex values from debug logs. 2021-08-09 15:45:08 -03:00
Matthew Chen
e734b0beb7 Respond to CR. 2021-08-04 17:08:40 -03:00
Matthew Chen
404062ed29 Cache formatting of PersonNameComponents. 2021-08-04 17:08:28 -03:00
Eugene Bistolas
2bc603786e Context Menu Design Feedback 2021-08-02 13:27:38 -10:00