1.0.12 • Published 5 years ago

xmpp-push-notifications v1.0.12

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Push Notifications

This plugin inserts the capability of customize the push notifications to work with ejabberd and React Native.

Install

Just run yarn add xmpp-push-notifications or npm install --save xmpp-push-notifications.

Configuration

This plugin needs no configuration.

How to use

For Node/CommonJS:

const PushNotifications = require('xmpp-push-notifications');

client.use(PushNotifications);

For ES6+:

import PushNotifications from 'xmpp-push-notifications';

client.use(PushNotifications);

Functions

This package adds two new functions to use, registerPush and setPushCustomFields, as described above:

client.registerPush(
  token,
  {
    sandbox = false,
    platform = 'applepush',
    keepAlive = 30,
    session = 60,
    offline = true,
    appId = 'com.netlolo.naturachat',
  },
);

The function accepts the following parameters in order:

  • token: a string containing the user Device Token.
  • options (optional) a series of optional options.
client.setPushCustomFields(
  message,
  '@netlolo/naturachat',
);

The function accepts the following parameters in order:

  • message: the original message object.
  • experienceId (optional): the experienceId used by ExpoKit to detect new push notifications.

License

This plugin is MIT licensed.

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago