From 9bdba4108f309c41e40e850339de147e52e455bb Mon Sep 17 00:00:00 2001 From: Tanuj Date: Sun, 15 Oct 2017 19:41:09 +0100 Subject: [PATCH 1/2] Fix 'brigde' typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 8e85ba99e59f4cac50177f1d4c79acaf27d62d27 Mon Sep 17 00:00:00 2001 From: Sijmen Schoon Date: Thu, 19 Oct 2017 00:39:31 +0200 Subject: [PATCH 2/2] Make Matrix AS port configurable. Fixes #35 --- config.json.example | 5 +++-- telematrix/__init__.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) 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 bea6220..1e2113e 100644 --- a/telematrix/__init__.py +++ b/telematrix/__init__.py @@ -44,6 +44,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__":