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

Add support for dismissal-date to live activity notification #167

Merged
merged 3 commits into from
Jan 7, 2023

Conversation

mark-urbanthings
Copy link
Contributor

The existing implementation didn't have support for dismissal-date so have added support to the current beta. Code is working in prototype Vapor live notification service we've been working on. Changes:

  • Updated APNSLiveActivityNotification to accept a dismissal date as unix timestamp value.
  • Added unit tests to validate JSON encoding of APNSLiveActivityNotification.
  • Added extension to Int to provide dismissImmediately constant.
  • Updated examples in README.md

Would be helpful if this accepted - thanks!

Updated APNSLiveActivityNotification to accept a dismissal date as unix timestamp value.

Added unit tests to validate JSON encoding of APNSLiveActivityNotification.

Added extension to Int to provide dismissImmediately constant.

Updated examples in README.md
Copy link
Member

@kylebrowning kylebrowning left a comment

Choose a reason for hiding this comment

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

This LGTM, will wait for tests to pass

Copy link
Contributor

@FranzBusch FranzBusch left a comment

Choose a reason for hiding this comment

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

Thanks for adding this. Left some inline comments

* Added APNSLiveActivityDismissalDate struct
* Cleaned up unrequired imports
* Updated to use new struct for specifying dimissal time
* Updated live activity unit tests to use new struct
@kylebrowning kylebrowning merged commit 063c16e into swift-server-community:main Jan 7, 2023
@kylebrowning
Copy link
Member

Thanks @mark-urbanthings

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