wireapp/broadcast-bot

Name: broadcast-bot

Owner: Wire Swiss GmbH

Description: Broadcast Channel for Wire

Created: 2017-02-22 16:00:56.0

Updated: 2018-05-07 18:03:22.0

Pushed: 2017-05-16 12:27:34.0

Homepage:

Size: 74

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Broadcast bot

This Bot can be used as Broadcast Channel for broad audience. In order to subscribe to a channel user should use the link: https://wire.com/b/[channel_name]. There is no limitation as in number of subscribers or number of messages. Once the message is broadcast it will take couple of seconds to be delivered to all subscribers. Message can be: text, web page, picture (a url to jpg|png|gif), youtube link, soundcloud link … All messages are stored in broadcast.db SQLite DB on the server. Incoming messages from the subscribers are also stored in broadcast.db.

Channels vs. Groups
Build the project
 -Plinux package

windows and darwin are also supported. Running gen_cert.sh will generate self signed certificate and keystore file (stored in certs folder). Modify the script before the run in order to better reflect your company's name/country…

Register as Wire Bot Developer

This is done using DevBot. Go to https://wire.com/b/devbot and log in with your Wire credentials

Create new bot

Again through DevBot: Create your bot (in this case it will be a bot to serve as a channel). Pick up some unique/catchy name for the bot. When asked to provide the public key use the one from ./certs/pubkey.pem

Deployment

Deploy:

dcast.jar
dcast.yaml
tore.jks

files to your server. Notice that you will need a Public IP to serve as endpoint that will be called by the Wire Backend

Run the Service
 -jar /path/to/broadcast.jar server /path/to/broadcast.yaml
Setup Admin Conversation

In order to receive all the incoming messages from the subscribers you can select an existing conversation with the broadcast bot and let the service channel all the messages there. Update admin param in broadcast.yaml with the BotId. BotId is printed as first message when subscribing (also visible in logs)

How to Broadcast messages

Go to: https://localhost:443/assets/message.html Enter Secret (that matches appSecret in broadcast.yaml)and post your first message Alternatively: posting into Admin Conversation would broadcast the message to all subscribers

List all Incoming Messages and Broadcasts
l -XPOST http://localhost:8061/tasks/messages
l -XPOST http://localhost:8061/tasks/broadcasts

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.