timehop / apns

A Go package to interface with the Apple Push Notification Service
https://godoc.org/github.com/timehop/apns
MIT License
185 stars 47 forks source link

Add support for email push notifications #52

Closed st3fan closed 9 years ago

st3fan commented 9 years ago

This patch adds support for Email Push Notifications by introducing an AccountId field in the APNS structure.

This is used in my https://github.com/st3fan/dovecot-xaps-daemon project. (The master branch is in Python but I have recently rewritten this tool in Go and the version in the go branch depends on the https://github.com/timehop/apns project)

nathany commented 9 years ago

Are Email Push Notifications something from Apple? Can you point to the docs?

st3fan commented 9 years ago

AFAIK The only documentation is the source code that Apple published for OS X Server.

http://www.opensource.apple.com/source/dovecot/dovecot-293/dovecot.push-notify/daemon/push_notify.m

nathany commented 9 years ago

Thanks Stefan. Would you mind adding a test to notification_test.go?

st3fan commented 9 years ago

Added a quick test to make sure the right JSON is generated.

nathany commented 9 years ago

LGTM

nathany commented 8 years ago

@st3fan When you send an {"aps": {"account-id": "1234"}} do you use any other fields?

st3fan commented 8 years ago

@nathany Nope

nathany commented 8 years ago

Good, good. I haven't added email push notification support explicitly to Buford (HTTP/2 Notification API for Go 1.6). You can very easily send whatever JSON you like, but if you want to add specific support, I'd be open to that.