Fix mautrix-signal not reading the token from the registration file

Signed-off-by: magic_rb <magic_rb@redalder.org>
This commit is contained in:
magic_rb 2024-02-11 14:23:28 +01:00
parent 3636117da1
commit 3c33fc7b08
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E
2 changed files with 6 additions and 2 deletions

View file

@ -25,6 +25,10 @@
[ -e "$REGISTRATION_FILE" ] || \ [ -e "$REGISTRATION_FILE" ] || \
${lib.getExe' pkgs.mautrix-signal "mautrix-signal"} -c "$CONFIG_FILE" -r "$REGISTRATION_FILE" -g ${lib.getExe' pkgs.mautrix-signal "mautrix-signal"} -c "$CONFIG_FILE" -r "$REGISTRATION_FILE" -g
sed -i \
-e 's/@AS_TOKEN@/'"$(${lib.getExe pkgs.yq} -r '.as_token' "$REGISTRATION_FILE")/" \
-e 's/@HS_TOKEN@/'"$(${lib.getExe pkgs.yq} -r '.hs_token' "$REGISTRATION_FILE")/" \
"$CONFIG_FILE"
${lib.getExe' pkgs.mautrix-signal "mautrix-signal"} -c "$CONFIG_FILE" -r "$REGISTRATION_FILE" -n ${lib.getExe' pkgs.mautrix-signal "mautrix-signal"} -c "$CONFIG_FILE" -r "$REGISTRATION_FILE" -n
''; '';
}; };

View file

@ -69,8 +69,8 @@ appservice:
ephemeral_events: true ephemeral_events: true
# Authentication tokens for AS <-> HS communication. Autogenerated; do not modify. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
# as_token: "This value is generated when generating the registration" as_token: "@AS_TOKEN@"
# hs_token: "This value is generated when generating the registration" hs_token: "@HS_TOKEN@"
# Prometheus telemetry config. Requires prometheus-client to be installed. # Prometheus telemetry config. Requires prometheus-client to be installed.
metrics: metrics: