Skip to content

Implement support to send delayed push notification using .NET SDK. #94

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

Conversation

Julien-Mialon
Copy link
Contributor

Hello,

This changed add the possibility to specify PushTime properties in ParsePush instance to be able to send delayed notifications.

if (state.PushTime.HasValue) {
DateTime push = state.PushTime.Value;
DateTime universalTime = push.ToUniversalTime();
payload["push_time"] = universalTime.ToString("yyyy-MM-ddTHH:mm:ssZ");
Copy link
Contributor

Choose a reason for hiding this comment

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

I think I'd prefer this as a one-liner.

payload['push_time'] = state.PushTime.Value.ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ')

@richardjrossiii
Copy link
Contributor

Awesome, I love it!

Seeing as this is a public API change, I'll need to get some input from the rest of the team in terms of how this API will work cross-platform, seeing as this will be the first SDK to have this feature.

Similar to your other PR, the line ending stuff will need to be fixed up before we can merge (sorry!).

The code looks great overall, nice work!

cc @grantland @wangmengyan95 @stanleyw @andrewimm @nlutsenko @hallucinogen

@Julien-Mialon
Copy link
Contributor Author

Hello,

Just fixed line endings and indentation issue. Got some trouble with git to do it so tell me if you prefer I create another pull request with only 1 commit with all modifications.

@richardjrossiii
Copy link
Contributor

Awesome!

I've talked internally with the rest of the team and we will be implementing this feature across all platforms. That means it's a go-ahead to merge after it's been squashed.

No need to create another pull request. You can use git's interactive rebase mode to squash all of these commits down into one:

git rebase -i master

Next, in the editor, replace all of the pick commands (except the first one!) with fixup, and then use a force push to make those changes be reflected here on github.

Let me know if any of those commands needs more explanation.

@Julien-Mialon Julien-Mialon force-pushed the feature/DelayedPushSupport branch from ef64bf5 to 920221d Compare November 24, 2015 16:00
@Julien-Mialon Julien-Mialon force-pushed the feature/DelayedPushSupport branch from 920221d to 48dcd54 Compare November 24, 2015 16:03
@Julien-Mialon
Copy link
Contributor Author

I rebased the repo, should be fine now.

richardjrossiii added a commit that referenced this pull request Nov 24, 2015
Implement support to send delayed push notification using .NET SDK.
@richardjrossiii richardjrossiii merged commit 01842a1 into parse-community:master Nov 24, 2015
@richardjrossiii
Copy link
Contributor

100% awesome, thanks!

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.

3 participants