matrix-synapse: fix user check

This commit is contained in:
Jörg Thalheim
2024-06-11 16:04:36 +02:00
parent 084cd8751f
commit 24b0d72d96
2 changed files with 4 additions and 1 deletions

View File

@@ -187,7 +187,8 @@ in
''
+ lib.concatMapStringsSep "\n" (user: ''
# only create user if it doesn't exist
if ! curl --header "$headers" "http://localhost:8008/_synapse/admin/v1/whois/${user.name}@${cfg.domain}" >&2; then
set -x
if ! curl --silent --header "@$headers" "http://localhost:8008/_synapse/admin/v1/whois/@${user.name}:${cfg.domain}" >&2; then
/run/current-system/sw/bin/matrix-synapse-register_new_matrix_user --password-file ${
config.clanCore.facts.services."matrix-password-${user.name}".secret."matrix-password-${user.name}".path
} --user "${user.name}" ${if user.admin then "--admin" else "--no-admin"}