INACTIVE
Перейти к файлу
=Corey Hulen d8dec36aea Updating readme 2016-02-23 13:42:28 -08:00
Godeps Adding google cloud messaging 2016-02-05 14:53:45 -08:00
build Cleaning up make and build 2015-12-02 14:08:46 -08:00
config Adding google cloud messaging 2016-02-05 14:53:45 -08:00
server Adding logging and fixing readme 2016-02-23 13:11:41 -08:00
.gitignore Cleaning up make and build 2015-12-02 14:08:46 -08:00
.travis.yml Fixing tags 2015-11-30 15:24:29 -08:00
CONTRIBUTING.md Create CONTRIBUTING.md 2015-12-09 22:13:31 -08:00
LICENSE.txt Create LICENSE.txt 2015-12-01 15:00:33 -08:00
Makefile Cleaning up make and build 2015-12-02 14:08:46 -08:00
NOTICE.txt Initial Commit 2015-11-30 11:29:47 -08:00
README.md Updating readme 2016-02-23 13:42:28 -08:00
main.go Initial Commit 2015-11-30 11:29:47 -08:00

README.md

Mattermost Push Notifications Service

A server for proxying push notifications to iOS devices from Mattermost, a self-hosted team communication solution.

For organizations who want to keep internal communications behind their firewall, this service encrypts notification messages with a private key under your control before sending them to Apple's public push notification service for delivery to your iOS devices.

Requirements

  1. A linux Ubuntu 14.04 server with at least 1GB of memory.
  2. Having either compiled the Mattermost iOS app and submitted it to the Apple App Store, or hosted in your own Enterprise App Store.
  3. Private and public keys obtained from the Apple Developer Program

Installation

  1. Install the latest release of the Mattermost Notification Server.
  2. Create a directory, for example /home/ubuntu/push-proxy.
  3. Download Mattermost Notification Server v2.0 with wget https://github.com/mattermost/push-proxy/releases/download/v2.0/matter-push-proxy.tar.gz.
  4. Uncompress the file with tar -xvzf matter-push-proxy.tar.gz.
  5. Update config.json with your private and public keys.
  6. Edit using vi /home/ubuntu/push-proxy/config/config.json and set ApplePushCertPublic and ApplePushCertPrivate, this should be a path to the public and private keys previously generated. For example
"ApplePushCertPublic": "./config/publickey.cer",
"ApplePushCertPrivate": "./config/privatekey.pem",
  1. Edit using vi /home/ubuntu/push-proxy/config/config.json and set AndroidApiKey, this should be a key generated from Google Cloud Messaging. For example
"AndroidApiKey": "DKJDIiwjerljd290u34jFKDSF",
  1. Verify push notifications are working by mentioning a user who is offline, which should trigger a push notification.
  2. You can verify that the server operates normally by using curl:
curl http://127.0.0.1:8066/api/v1/send_push -X POST -H "Content-Type: application/json" -d '{ "message":"test", "badge": 1, "platform":"apple", "server_id":"MATTERMOST_DIAG_ID", "device_id":"IPHONE_DEVICE_ID"}'

Replace MATTERMOST_DIAG_ID and IPHONE_DEVICE_ID with the relevant values.