Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3299734
D13431.id44505.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
954 B
Referenced Files
None
Subscribers
None
D13431.id44505.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D13431: [native] Avoid Promise.allSettled
Attached
Detach File
Event Timeline
Log In to Comment