Offline notifier block notifies the offline users using RingCentral SMS API. If a message is published and a user is not listening to the chat channel, an SMS notification is sent to that user.
This block sends SMS notifications to offline users.
A message is sent targeting a user's uuid. The block then checks PubNub presence to see if that user is online. If the user is online, the message is sent over PubNub so that the target user can receive it.
If the user is not online, the event handler uses the phone number of the offline user and sends the message over SMS using RingCentral's API. Visit https://developer.ringcentral.com/ to get your credentials for RingCentral API.
Publish a message over the input channel. Input Channel: notifier-channel
{ "text": "Hi How are you", "to_uuid": "user_uuid" }
Need help? Contact PubNub Support.
Copyright (c) 2018 PubNub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.