2018-05-29 20:20:08 +02:00
|
|
|
A bridge for exchanging messages between [matrix.org](https://matrix.org) and Zulip!
|
2018-05-22 09:44:53 +02:00
|
|
|
|
2018-05-30 19:39:23 +02:00
|
|
|
{!install-matrix.md!}
|
2018-05-29 20:20:08 +02:00
|
|
|
|
|
|
|
### Configure the bridge
|
2018-05-22 09:44:53 +02:00
|
|
|
|
2018-06-12 03:02:57 +02:00
|
|
|
1. {!create-stream.md!}
|
2018-05-22 09:44:53 +02:00
|
|
|
|
2018-06-12 03:02:57 +02:00
|
|
|
1. On your {{ settings_html|safe }}, create a **Generic** bot for
|
|
|
|
{{ integration_display_name }}. Subscribe this bot to the stream
|
|
|
|
created in step 1.
|
2018-05-30 19:01:17 +02:00
|
|
|
|
2018-06-12 03:02:57 +02:00
|
|
|
1. Open `zulip/integrations/matrix/matrix_bridge_config.py` with your
|
|
|
|
favorite editor, and change the following lines in the `zulip`
|
|
|
|
section:
|
2018-05-30 19:01:17 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
"zulip": {
|
|
|
|
"email": "matrix-bot@chat.zulip.org",
|
|
|
|
"api_key": "your_key",
|
|
|
|
"site": "https://chat.zulip.org",
|
|
|
|
"stream": "Stream which acts as the bridge",
|
|
|
|
"topic": "Topic of the stream"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2018-06-12 03:02:57 +02:00
|
|
|
**email**, **api_key**, and **site** should come from your
|
|
|
|
{{ integration_display_name }} bot's `zuliprc` file. Set **stream**
|
|
|
|
to the name of the stream created in step 1, and set **topic** to
|
|
|
|
a topic of your choice.
|
|
|
|
|
|
|
|
1. Create a user on [matrix.org](https://matrix.org/), preferably
|
|
|
|
with a descriptive name such as `zulip-bot`.
|
2018-05-30 19:01:17 +02:00
|
|
|
|
2018-06-12 03:02:57 +02:00
|
|
|
1. Open `matrix_bridge_config.py`, and provide your Matrix credentials
|
|
|
|
in the `matrix` section:
|
2018-05-30 19:01:17 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
"matrix": {
|
|
|
|
"host": "https://matrix.org",
|
|
|
|
"username": "username of matrix.org user",
|
|
|
|
"password": "password of matrix.org user",
|
|
|
|
"room_id": "#room:matrix.org"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2018-06-12 03:02:57 +02:00
|
|
|
1. Run `python matrix_bridge.py` to start mirroring content.
|
|
|
|
|
|
|
|
!!! tip ""
|
2018-05-30 19:01:17 +02:00
|
|
|
|
2018-06-12 03:02:57 +02:00
|
|
|
If you want to customize the message formatting, you can do so by
|
|
|
|
editing the variables `MATRIX_MESSAGE_TEMPLATE` and
|
|
|
|
`ZULIP_MESSAGE_TEMPLATE` in
|
|
|
|
`zulip/integrations/matrix/matrix_bridge.py`.
|
2018-05-22 09:44:53 +02:00
|
|
|
|
|
|
|
**Congratulations! You have created the bridge successfully!**
|