The matrix integration folder in python-zulip-api changed its name from matrix to bridge_with_matrix but this was not reflected in the docs. Change the docs accordingly. Solves issue #545 in the python-zulip-api directory.
2.1 KiB
Configure the bridge
-
In Zulip, create a bot, using Generic bot for the bot type. Download the bot's
zuliprcconfiguration file to your computer. -
Subscribe the bot to the Zulip stream that will contain the mirror.
-
Inside the virtualenv you created above, run
python zulip/integrations/bridge_with_matrix/matrix_bridge.py \ --write-sample-config matrix_bridge.conf --from-zuliprc <path/to/zuliprc>where
<path/to/zuliprc>is the path to thezuliprcfile you downloaded. -
Create a user on matrix.org or another matrix server, preferably with a descriptive name like
zulip-bot. -
Edit
matrix_bridge.confto look like this:[zulip] email = bridge-bot@chat.zulip.org api_key = aPiKeY site = https://chat.zulip.org stream = "stream name" topic = "{{ integration_display_name }} mirror" [matrix] host = https://matrix.org username = <your matrix username> password = <your matrix password> room_id = #room:matrix.orgThe first three values should already be there; the rest you'll have to fill in. Make sure stream is set to the stream the bot is subscribed to.
{% if 'IRC' in integration_display_name %}
NOTE: For matrix.org, the
room_idgenerally takes the form#<irc_network>_#<channel>:matrix.org. You can see the format for several popular IRC networks here, under the "Room alias format" column.For example, the
room_idfor the#zulip-testchannel on freenode is#freenode_#zulip-test:matrix.org.{% endif %}
-
Run the following command to start the matrix bridge:
python zulip/integrations/bridge_with_matrix/matrix_bridge.py -c matrix_bridge.conf
!!! tip ""
You can customize the message formatting by
editing the variables `MATRIX_MESSAGE_TEMPLATE` and `ZULIP_MESSAGE_TEMPLATE`
in `zulip/integrations/bridge_with_matrix/matrix_bridge.py`.