Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Max Sandholm 2017-10-25 13:23:51 +03:00
commit 2b186ad31c
3 changed files with 6 additions and 4 deletions

View File

@ -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. - 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: 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. - 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 ## Installation

View File

@ -13,6 +13,7 @@
}, },
"user_id_format": "@telegram_{}:DOMAIN.TLD", "user_id_format": "@telegram_{}:DOMAIN.TLD",
"db_url": "sqlite:///database.db" "db_url": "sqlite:///database.db",
}
"as_port": 5000
}

View File

@ -45,6 +45,7 @@ try:
USER_ID_FORMAT = CONFIG['user_id_format'] USER_ID_FORMAT = CONFIG['user_id_format']
DATABASE_URL = CONFIG['db_url'] DATABASE_URL = CONFIG['db_url']
AS_PORT = CONFIG['as_port'] if 'as_port' in CONFIG else 5000
except (OSError, IOError) as exception: except (OSError, IOError) as exception:
print('Error opening config file:') print('Error opening config file:')
print(exception) print(exception)
@ -709,7 +710,7 @@ def main():
app.router.add_route('GET', '/rooms/{room_alias}', matrix_room) app.router.add_route('GET', '/rooms/{room_alias}', matrix_room)
app.router.add_route('PUT', '/transactions/{transaction}', app.router.add_route('PUT', '/transactions/{transaction}',
matrix_transaction) matrix_transaction)
web.run_app(app, port=5000) web.run_app(app, port=AS_PORT)
if __name__ == "__main__": if __name__ == "__main__":