GithubHelp home page GithubHelp logo

mod_zeropush's Introduction

Purpose:

mod_zeropush sends an API request to ZeroPush when a message is sent to an offline user.

The notification contains the following URI-encoded payload:

{
	"auth_token": "{config-auth_token}",
	"channel": "{recipient-jid}",
	"alert": "{chat-message-body}",
	"badge": "+1",
	"sound": "{config-sound}",
	"info": {
		"from": "{sender-jid}"
	}
}

Caveats:

mod_zeropush assumes that you have created broadcast channels with the user's jabber id that represent the devices you would like to notify.

Please read register and subscribe how to use broadcast channels.

Note:

Between ejabberd 2.1.13 and 13.10 there were significant changes and modules compiled for one version don't directly work with the other version. Checkout the branch that corresponds to the version of ejabberd that you are running.

Installing:

  • Make sure you have erlang installed on the machine you are building from
    • You probably want this to be the same machine you intend to install/run ejabberd on. I'm not sure about the interoperability of ejabberd/erlang versions.
  • Open the Emakefile and change /usr/local/Cellar/ejabberd/2.1.13/lib/ejabberd/include to the correct path on your machine
  • Run the ./build.sh to build *.beam files
  • Copy the *.beam files from the ebin directory to the location where the other modules are for your server
  • Add the configuration from below

eJabberd 13.10

Configuration

in ejabberd.yml

mod_zeropush:
	sound: "default"
	auth_token: "your-auth-token"
	post_url: "https://api.zeropush.com/broadcast"

eJabberd 2.1.13

Configuration

in ejabberd.cfg

{mod_zeropush, [
	{sound, "default"},
	{auth_token, "your-auth-token"},
	{post_url, "https://api.zeropush.com/broadcast"}
]}

mod_zeropush's People

Contributors

adamvduke avatar snatchev avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.