From e7a3cbf7e45b52c456c339721cfe038e7e3fe97e Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 1 Sep 2020 13:21:26 +0300 Subject: [PATCH] Fix references to twitter --- docker-run.sh | 11 ++++------- mautrix_amp/commands/conn.py | 2 +- mautrix_amp/config.py | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/docker-run.sh b/docker-run.sh index 7ea3cda..80f4ee3 100755 --- a/docker-run.sh +++ b/docker-run.sh @@ -2,13 +2,10 @@ # Define functions. function fixperms { - chown -R $UID:$GID /data /opt/mautrix-twitter + chown -R $UID:$GID /data /opt/mautrix-amp } -cd /opt/mautrix-twitter - -# Replace database path in config. -sed -i "s#sqlite:///mautrix-twitter.db#sqlite:////data/mautrix-twitter.db#" /data/config.yaml +cd /opt/mautrix-amp if [ ! -f /data/config.yaml ]; then cp example-config.yaml /data/config.yaml @@ -21,7 +18,7 @@ if [ ! -f /data/config.yaml ]; then fi if [ ! -f /data/registration.yaml ]; then - python3 -m mautrix_twitter -g -c /data/config.yaml -r /data/registration.yaml + python3 -m mautrix_amp -g -c /data/config.yaml -r /data/registration.yaml echo "Didn't find a registration file." echo "Generated one for you." echo "Copy that over to synapses app service directory." @@ -30,4 +27,4 @@ if [ ! -f /data/registration.yaml ]; then fi fixperms -exec su-exec $UID:$GID python3 -m mautrix_twitter -c /data/config.yaml +exec su-exec $UID:$GID python3 -m mautrix_amp -c /data/config.yaml diff --git a/mautrix_amp/commands/conn.py b/mautrix_amp/commands/conn.py index b832aa2..8747ff1 100644 --- a/mautrix_amp/commands/conn.py +++ b/mautrix_amp/commands/conn.py @@ -25,7 +25,7 @@ async def set_notice_room(evt: CommandEvent) -> None: @command_handler(needs_auth=False, management_only=True, help_section=SECTION_CONNECTION, - help_text="Check if you're logged into Twitter") + help_text="Check if you're logged into Android Messages") async def ping(evt: CommandEvent) -> None: status = await evt.sender.client.start() if status.is_logged_in: diff --git a/mautrix_amp/config.py b/mautrix_amp/config.py index a5098fc..afb1068 100644 --- a/mautrix_amp/config.py +++ b/mautrix_amp/config.py @@ -27,7 +27,7 @@ Permissions = NamedTuple("Permissions", user=bool, admin=bool, level=str) class Config(BaseBridgeConfig): def __getitem__(self, key: str) -> Any: try: - return os.environ[f"MAUTRIX_TWITTER_{key.replace('.', '_').upper()}"] + return os.environ[f"MAUTRIX_AMP_{key.replace('.', '_').upper()}"] except KeyError: return super().__getitem__(key)