Skip to content

Instantly share code, notes, and snippets.

@marcinwasowicz
Created September 13, 2023 13:59
Show Gist options
  • Save marcinwasowicz/5011d3c1d5418e1a3af06f6be182e739 to your computer and use it in GitHub Desktop.
Save marcinwasowicz/5011d3c1d5418e1a3af06f6be182e739 to your computer and use it in GitHub Desktop.
Send each notif twice to trigger olm error on iOS.
diff --git a/keyserver/src/push/utils.js b/keyserver/src/push/utils.js
index d9c9b2955..1be2e148f 100644
--- a/keyserver/src/push/utils.js
+++ b/keyserver/src/push/utils.js
@@ -61,11 +61,14 @@ async function apnPush({
}
invariant(apnProvider, `keyserver/secrets/${pushProfile}.json should exist`);
- const results = await Promise.all(
- targetedNotifications.map(({ notification, deviceToken }) => {
+ const results = await Promise.all([
+ ...targetedNotifications.map(({ notification, deviceToken }) => {
return apnProvider.send(notification, deviceToken);
}),
- );
+ ...targetedNotifications.map(({ notification, deviceToken }) => {
+ return apnProvider.send(notification, deviceToken);
+ }),
+ ]);
const mergedResults = { sent: [], failed: [] };
for (const result of results) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment