A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.
fix(api): run the notification extension on every iOS alert (#2933)
Hampus50ad23b760e8
diff --git a/fluxer_api/src/api/push/ApnsPushService.ts b/fluxer_api/src/api/push/ApnsPushService.tsindex 11d10f464..e8f5eb86e 100644--- a/fluxer_api/src/api/push/ApnsPushService.ts+++ b/fluxer_api/src/api/push/ApnsPushService.ts@@ -204,9 +204,7 @@ function buildApnsPayload(payload: Record<string, unknown>): Record<string, unknif (badge !== undefined) {aps.badge = badge;}- if (imageUrl) {- aps['mutable-content'] = 1;- }+ aps['mutable-content'] = 1;return {...data,title,diff --git a/fluxer_api/src/api/push/tests/ApnsPushService.test.ts b/fluxer_api/src/api/push/tests/ApnsPushService.test.tsindex f392864c6..6e0977b21 100644--- a/fluxer_api/src/api/push/tests/ApnsPushService.test.ts+++ b/fluxer_api/src/api/push/tests/ApnsPushService.test.ts@@ -139,7 +139,7 @@ describe('ApnsPushService', () => {notification: {title: 'Alice', body: 'Hello', icon: 'https://cdn.example/avatar.png'},});expect(payload.image_url).toBeUndefined();- expect(payload.aps).not.toHaveProperty('mutable-content');+ expect(payload.aps).toHaveProperty('mutable-content', 1);expect(payload.author_avatar_url).toBe('https://cdn.example/avatar.png');});it('imports the APNs signing key once per PEM and rejects a truncated one every time', async () => {