This module handles the push_notification
hook generated by mod_pubsub
with an active push
node.
Each push_notification
hook is converted as a REST
API call to the MongoosePush service.
The following publish-options
that are added to the hook are directly passed to MongoosePush
:
mode
- if not supplied,prod
value will be usedclick_action
- optional. Seeclick_action
in the FCM documentation orcategory
in the APNS documentation.topic
- null if not suppliedservice
- has to be specified and the value must be valid and supported by the MongoosePush push service provider. E.g.fcm
,apns
.device_id
- has to be specified and the value must be valid device token received from push notification service provider specified inservice
option
In addition to those publish-options
you may specify also silent
option, that when set to
true
will result in "silent" notification.
Silent notifications send only data payload to push notifications service provider with all
fields specified in the notification without any modification and/or filtering.
This module uses a connection pool created by mongoose_http_client.
It must be defined in http_connections
setting.
- pool_name (atom, required) - name of the pool to use (as defined in http_connections)
- api_version (string, default:
v2
) - REST API version to be used. - max_http_connections (integer, default: 100) - the maximum amount of concurrent http connections
{http_connections, [{mongoose_push_http,
[{server, "https://localhost:8443"}]
}]}.
{mod_push_service_mongoosepush, [
{pool_name, mongoose_push_http}
{api_version, "v2"}
]}.