Page MenuHomePhabricator

D13431.id44505.diff
No OneTemporary

D13431.id44505.diff

diff --git a/lib/push/send-utils.js b/lib/push/send-utils.js
--- a/lib/push/send-utils.js
+++ b/lib/push/send-utils.js
@@ -993,7 +993,25 @@
}
try {
- await Promise.allSettled(olmSessionCreationPromises);
+ // The below is equvialent to
+ // Promise.allSettled(olmSessionCreationPromises), which appears to be
+ // undefined in Android (at least on debug builds) as of Sept 2024
+ await Promise.all(
+ olmSessionCreationPromises.map(async promise => {
+ try {
+ const result = await promise;
+ return ({
+ status: 'fulfilled',
+ value: result,
+ }: $SettledPromiseResult<void>);
+ } catch (e) {
+ return ({
+ status: 'rejected',
+ reason: e,
+ }: $SettledPromiseResult<void>);
+ }
+ }),
+ );
} catch (e) {
// session creation may fail for some devices
// but we should still pursue notification

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 3:08 PM (20 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2535122
Default Alt Text
D13431.id44505.diff (954 B)

Event Timeline