Created
September 12, 2023 12:14
-
-
Save marcinwasowicz/a318bb475e575df662429702905b4a01 to your computer and use it in GitHub Desktop.
Keyserver changes to test encrypted notifications coalescing on the keyserver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/keyserver/src/push/send.js b/keyserver/src/push/send.js | |
index 7c705a864..78fddfe24 100644 | |
--- a/keyserver/src/push/send.js | |
+++ b/keyserver/src/push/send.js | |
@@ -714,14 +714,14 @@ async function prepareAPNsNotification( | |
platformDetails, | |
} = convertedData; | |
- const isTextNotification = newRawMessageInfos.every( | |
- newRawMessageInfo => newRawMessageInfo.type === messageTypes.TEXT, | |
- ); | |
+ // const isTextNotification = newRawMessageInfos.every( | |
+ // newRawMessageInfo => newRawMessageInfo.type === messageTypes.TEXT, | |
+ // ); | |
const shouldBeEncrypted = | |
platformDetails.platform === 'ios' && | |
- !collapseKey && | |
- isTextNotification && | |
+ // !collapseKey && | |
+ // isTextNotification && | |
platformDetails.codeVersion && | |
platformDetails.codeVersion > 222; | |
@@ -753,7 +753,8 @@ async function prepareAPNsNotification( | |
notification.mutableContent = true; | |
} | |
if (collapseKey) { | |
- notification.collapseId = collapseKey; | |
+ // notification.collapseId = collapseKey; | |
+ notification.payload.collapseID = collapseKey; | |
} | |
const messageInfos = JSON.stringify(newRawMessageInfos); | |
// We make a copy before checking notification's length, because calling |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment