This is a Hubot adapter for Matrix.
Use the following adapter based on your Hubot version (npm list hubot
).
- For Hubot v2,
npm i hubot-matrix@1
- For Hubot v3,
npm i hubot-matrix@2
- For Hubot v13+,
npm i @xurizaemon/hubot-matrix
Set the following variables:
HUBOT_ADAPTER
should be@xurizaemon/hubot-matrix
HUBOT_MATRIX_HOST_SERVER
- the Matrix server to connect to (default ishttps://matrix.org
if unset)HUBOT_MATRIX_USER
- bot login on the Matrix server - eg@examplebotname:matrix.example.org
HUBOT_MATRIX_PASSWORD
- bot password on the Matrix server
To run tests in Github Actions, the following Github Secrets should be configured.
Name | Example | Description |
---|---|---|
TEST_MATRIX_URL |
https://matrix-client.matrix.org | Home instance URL |
TEST_MATRIX_ROOM |
!something:example.org |
Room ID (where to get it) |
TEST_MATRIX_USER |
@someuser:example.org |
Username |
TEST_MATRIX_PASSWORD |
******** |
Password |
See .github/workflows/*.yml
and test code for reference usage.
hubot-demo creates a fresh Hubot instance and connects to Matrix using creds provided from the secrets above to configure the Hubot instance.
Name | Example | Description |
---|---|---|
HUBOT_MATRIX_HOST |
https://matrix-client.matrix.org | Home instance URL |
HUBOT_MATRIX_PASSWORD |
**** | Test user a/c password. |
HUBOT_MATRIX_USERNAME |
**** | Test user a/c login. |
HUBOT_FAREWELL_* |
Configure hubot-farewell 1 |
Configure shutdown message |
HUBOT_STARTUP_* |
Configure hubot-startup 2 |
Configure startup message |
Jest requires the experimental-vm-modules Node option to run .mjs tests:
NODE_OPTIONS="$NODE_OPTIONS --experimental-vm-modules" npm run test