mod_web_push

Introduction

This module is terribly untested and will only work with Firefox as it’s missing payload encryption. Other vendors require it all the time. Public and private keys are also statically set in it.

This is an implementation of the server bits of [XEP-XXXX: Web Push].

It allows web clients to register a “push server” which is notified about new messages while the user is offline, disconnected or the session is hibernated by mod_smacks.

Push servers are provided by browser vendors.

This module is heavily based on mod_cloud_notify.

Details

Push API is a specification by the W3C that is essentially the same principle as Mobile OS vendors’ Push notification systems. It is implemented by most browsers vendors except Safari on iOS (mobile).

For more information, see:

Compared to XEP-0357: Push Notifications, Web Push doesn’t need an App Server.

The general flow for subscription is:

The flow for notifications is as follow:

Configuration

Option Default Description
push_notification_important_body New Message! The body text to use when the stanza is important (see above), no message body is sent if this is empty
push_max_devices 5 The number of allowed devices per user (the oldest devices are automatically removed if this threshold is reached)

There are privacy implications for enabling these options because plaintext content and metadata will be shared with centralized servers (the pubsub node) run by arbitrary app developers.

Installation

Same as any other module.

Configuration

Configured in-band by supporting clients.


  1. As defined in mod_cloud_notify, or mod_csi_simple.

Latest changes