diff --git a/README.md b/README.md index d5e055d..a601ef8 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ After the [installation](#installation), follow these steps to bridge a matrix r - The bot will answer with an alias, something like `#telegram_-XXXXXXXXX:yourserver.example`. Add that as an alias to the matrix room you want to bridge. In case it doesn't work make sure that all these are true: - - You are on the same server as the brigde. If that is not the case, you can't set the alias, because you can only set aliases on the server you are on. + - You are on the same server as the bridge. If that is not the case, you can't set the alias, because you can only set aliases on the server you are on. - The matrix room is not set to invite only. The bridge currently doesn't support invite only rooms, so the rooms must be set to be open for all. Guests access is not required though. ## Installation diff --git a/config.json.example b/config.json.example index 263027d..67378e0 100644 --- a/config.json.example +++ b/config.json.example @@ -13,6 +13,7 @@ }, "user_id_format": "@telegram_{}:DOMAIN.TLD", - "db_url": "sqlite:///database.db" -} + "db_url": "sqlite:///database.db", + "as_port": 5000 +} diff --git a/telematrix/__init__.py b/telematrix/__init__.py index 5b069a9..75ef826 100644 --- a/telematrix/__init__.py +++ b/telematrix/__init__.py @@ -45,6 +45,7 @@ try: USER_ID_FORMAT = CONFIG['user_id_format'] DATABASE_URL = CONFIG['db_url'] + AS_PORT = CONFIG['as_port'] if 'as_port' in CONFIG else 5000 except (OSError, IOError) as exception: print('Error opening config file:') print(exception) @@ -709,7 +710,7 @@ def main(): app.router.add_route('GET', '/rooms/{room_alias}', matrix_room) app.router.add_route('PUT', '/transactions/{transaction}', matrix_transaction) - web.run_app(app, port=5000) + web.run_app(app, port=AS_PORT) if __name__ == "__main__":