Stanislav N 335f576f20
Development stopped long time ago, sorry.
3 months ago
data README update, configuration example update. 2 years ago
lib Rooms types, database, plugins and HTML rendering. 2 years ago
migrations Rooms types, database, plugins and HTML rendering. 2 years ago
plugins Rooms types, database, plugins and HTML rendering. 2 years ago
vendor All hail HUGE refactoring! 2 years ago
.gitignore All hail HUGE refactoring! 2 years ago
.gitmodules All hail HUGE refactoring! 2 years ago
README.md Development stopped long time ago, sorry. 3 months ago
alembic.ini All hail HUGE refactoring! 2 years ago
bridge.py Rooms types, database, plugins and HTML rendering. 2 years ago
config.json.dist All hail HUGE refactoring! 2 years ago
registration.yaml.example Fixed registration.yaml.example to be valid YAML. 2 years ago
requirements.txt Rooms types, database, plugins and HTML rendering. 2 years ago
schema.sql Refactored, adopted for python 3 and working. 2 years ago

README.md

Development stopped due to lack of interest in XMPP for me.

Matrix-XMPP Bridge

This project creates a bridge between a Matrix room and an XMPP MUC. It is currently very early in development.

Originally forked from https://github.com/jfrederickson/matrix-xmpp-bridge it was heavily refactored and adopted for Python 3. Missing functionality was added (like be a bidirectional, users aliases in XMPP and Matrix, etc).

WARNING: this bridge isn't a "bot like" one, it REQUIRES that you have a possibility to add AS registration file to synapse's configuration file! It is still possible to bridge XMPP MUC on other's homeserver room. Just join it and use Room ID from settings!

Dependencies

  • python3
  • sleekxmpp
  • requests
  • flask
  • flask-classy

... or just pip install -r requirements.txt :)

Installation

Make sure you have Python 3 installed. I recommend PyENV for managing python versions and do not rely on system one. This guide will assume that you're installed Python 3 with PyENV.

After that clone this repo, go to source's root directory and execute:

pyenv local ${VERSION}

Where ${VERSION} is a Python version you installed previously.

After setting local python's version install dependencies:

pip install -r requirements.txt

This could take some time.

After all don't forget to update submodules:

git submodule init && git submodule update

Configuration

  • Add an AS and HS token to registration.yaml and reference it in your homeserver config as described here
  • Edit mxbridge.conf.example with user and room details for the Matrix/XMPP rooms you would like to bridge and save as mxbridge.conf in bot's source directory
  • Start bridge.py

Custom configuration file

There is a possibility to specify configuration file name while launching bridge. It is useful to run several independent instances using one code base. Just pass configuration file name after "bridge.py", like this:

./bridge.py my_custom_mxbridge.conf

Synapse

Due to some (temporary) things, it is better to set rc_messages_per_second to 5, otherwise bridge could eat messages when it detects new XMPP user to map to Matrix.