Fix references to twitter
This commit is contained in:
parent
8bef004a46
commit
e7a3cbf7e4
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user