Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(fcm): Support arbitrary custom values in the ApnsPayload #1097

Merged
merged 1 commit into from
Nov 24, 2020

Conversation

hiranya911
Copy link
Contributor

ApnsPayload can contain any valid JSON values.

Resolves #1023

Copy link
Member

@lahirumaramba lahirumaramba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need any tests for this? Otherwise, LGTM!

@hiranya911
Copy link
Contributor Author

hiranya911 commented Nov 24, 2020

Already covered in:

label: 'All APNS properties',
req: {
apns: {
headers: {
h1: 'v1',
h2: 'v2',
},
payload: {
aps: {
alert: {
title: 'title',
subtitle: 'subtitle',
body: 'body',
titleLocKey: 'title.loc.key',
titleLocArgs: ['arg1', 'arg2'],
subtitleLocKey: 'subtitle.loc.key',
subtitleLocArgs: ['arg1', 'arg2'],
locKey: 'body.loc.key',
locArgs: ['arg1', 'arg2'],
actionLocKey: 'action.loc.key',
launchImage: 'image',
},
badge: 42,
sound: 'test.sound',
category: 'test.category',
contentAvailable: true,
mutableContent: true,
threadId: 'thread.id',
},
customKey1: 'custom.value',
customKey2: { nested: 'value' },
},
fcmOptions: {
analyticsLabel: 'test.analytics',
imageUrl: 'https://example.com/image.png',
},
},
},

@hiranya911 hiranya911 merged commit a98a3cc into master Nov 24, 2020
@hiranya911 hiranya911 deleted the hkj-apns-payload branch November 24, 2020 20:50
BorntraegerMarc pushed a commit to BorntraegerMarc/firebase-admin-node that referenced this pull request Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect typings for ApnsPayload
2 participants