-
Notifications
You must be signed in to change notification settings - Fork 101
Home
Hubot-xmpp provides an adapter allowing Hubot to connect to XMPP MUC chatroom. There is a bit of configuration you can use to make hubot do your bidding.
The XMPP adapter requires only 3 (5 if you need specify server and port) environment variables to be set to able to use it.
HUBOT_XMPP_USERNAME
HUBOT_XMPP_PASSWORD
HUBOT_XMPP_ROOMS
Optional:
HUBOT_XMPP_HOST
HUBOT_XMPP_PORT
To set these variables on a Hubot deployed to Heroku you can use the following command from the directory of your deployed Hubot.
heroku config:add HUBOT_XMPP_USERNAME="[email protected]" HUBOT_XMPP_PASSWORD="HUBOT_XMPP_PASSWORD" HUBOT_XMPP_ROOMS="[email protected]"
Please use jid:passwd
syntax.
HUBOT_XMPP_ROOMS="[email protected]:p4sw0rd" # example
Please use jid1,jid2
syntax.
HUBOT_XMPP_ROOMS="[email protected],[email protected]" # example
HUBOT_XMPP_ROOMS="[email protected]:p4sw0rd,[email protected]:r4nd0m" # example
Warning: password can not contain comma.
To set these variables on a Hubot deployed to a UNIX(-like) operating system you can use the following commands.
export HUBOT_XMPP_USERNAME="[email protected]"
export HUBOT_XMPP_PASSWORD="account password"
export HUBOT_XMPP_ROOMS="[email protected]"
Using the hubot command line tool, you can create a standalone bot:
./bin/hubot -c ../my-bot
After creating your standalone bot, you can add hubot-xmpp
by adding it to the dependencies in your bot's package.json
.