push

Messaging and push notifications for mobile and other clients, supports Apple, Google and Webpush push notifications.

Emits a signal uninstall(client, device_id, user_id) on device invalidation or if a device token is invalid as reported by the server, user_id may not be available.

Description:
  • Messaging and push notifications for mobile and other clients, supports Apple, Google and Webpush push notifications.

    Emits a signal uninstall(client, device_id, user_id) on device invalidation or if a device token is invalid as reported by the server, user_id may not be available.

Type Definitions

callback(device, options)

Description:
  • Deliver a notification for the given device token(s).

Parameters:
Name Type Description
device string

where to send the message to, can be multiple ids separated by , or |.

options object
Properties
Name Type Description
user_id string

an user id associated with this token, for debugging and invalid token management

app_id string

send to the devices for the given app only, if none matched send to the default device tokens only

msg string

text message to send

badge int

badge number to show if supported by the service

sound boolean

set to true if a sound should be produced on message receive

type string

set type of the message, service specific

category string

action category for APN

id string

send id with the notification, this is application specific data, sent as is

name string

notification group name, can be used for grouping multiple messages under this name

url string

a launch url for the app, it show associated screen on launch if supported