8000 FCM Options Support in WebpushConfig API by hiranya911 · Pull Request #242 · firebase/firebase-admin-python · GitHub
[go: up one dir, main page]

Skip to content

FCM Options Support in WebpushConfig API #242

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

Merged
merged 4 commits into from
Jan 4, 2019
Merged

Conversation

hiranya911
Copy link
Contributor
@hiranya911 hiranya911 commented Jan 2, 2019

Adding the fcm_options parameter to the WebpushConfig type. Change ported from firebase/firebase-admin-node#373

Resolves #203

@hiranya911
Copy link
Contributor Author

Resolves #202

"""Options for features provided by the FCM SDK for Web.

Args:
link: The link to open when the user clicks on the notification. Must be a HTTPS URL
Copy link
Collaborator

Choose a reason for hiding this comment

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

s/a HTTPS/an HTTPS/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

}
result = cls.remove_null_values(result)
link = result.get('link')
if link is not None and not link.startswith('https://'):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we allow alternate capitalization on the protocol? I mean, "HTTPS://" is probably okay, right?

Copy link
8000
Contributor Author

Choose a reason for hiding this comment

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

Yes, but we have always checked only for the lower-cased prefix in this codebase (there are similar URL checks in auth, db etc). So I'll keep this consistent with that. Also developers haven't requested this, so it should be ok.

@hiranya911 hiranya911 assigned hiranya911 and unassigned bklimt Jan 4, 2019
@hiranya911 hiranya911 merged commit 47345a1 into master Jan 4, 2019
@hiranya911 hiranya911 deleted the hkj-fcm-options branch January 4, 2019 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0