How to join Matrix rooms via XMPP and vice-versa?

Published on: July 15, 2021 | Reading Time: 3 min
xmpp matrix

Matrix-XMPP bridge allows us to link Matrix rooms and XMPP rooms (called public channels) which means XMPP users can post messages in Matrix rooms (using XMPP itself) and Matrix users can post messages in XMPP rooms (using Matrix itself). Note - Matrix-XMPP bridging support is available for unencrypted rooms only as of now.

To create an XMPP-Matrix bridged room, we will use Conversations app for XMPP for demonstration. You can choose XMPP client of your choice. We’ll use this documentation for bridging.

Steps to create a bridged room:

Join Public Channel Give Channel a name Note XMPP Address

Note - In this tutorial, we first created an XMPP room (a public channel on XMPP) and then joined this room via Matrix. The drawback of this approach is that there is no admin access on the Matrix side as of now.

Not Recommended: The process can also be done the other way round as well, creating a Matrix room first and then joining it via XMPP. The drawback of the approach is that XMPP users miss the messages sent by Matrix users in the room when they’re offline. Due to this, we do not recommend creating the Matrix room first and then bridging it to XMPP. Additionally this keeps xmpp id of participants in public channels private, because by default matrix id in public groups are visible to all participants of matrix rooms but it is only visible to admins on XMPP public channels. However, if you would like to create a Matrix room first and then bridge it to XMPP, use the above steps and replace XMPP by Matrix and vice-versa. To convert the room’s Matrix address to XMPP address, use this documentation.