fix: use correct tuwunel admin room command prefix for make-user-admin
tuwunel requires '!admin users <cmd>' — bare 'make-user-admin @user:server' is not recognised. Update command string and doc comments.
This commit is contained in:
parent
0f505d5c95
commit
85de83bd49
1 changed files with 3 additions and 3 deletions
|
|
@ -807,7 +807,7 @@ pub async fn ensure_admin_user(client: &reqwest::Client, register_token: &str) -
|
|||
}
|
||||
|
||||
/// Promote a user to homeserver admin via the Matrix admin room
|
||||
/// (`#admins:<server>`). Sends `make-user-admin @<localpart>:<server>` as
|
||||
/// (`#admins:<server>`). Sends `!admin users make-user-admin @<localpart>:<server>` as
|
||||
/// @hive, polls for the bot's "Done:" success response.
|
||||
///
|
||||
/// tuwunel 1.6.x does not implement `/_synapse/admin/v2/users`; all admin
|
||||
|
|
@ -820,7 +820,7 @@ pub async fn promote_user_to_admin(
|
|||
) -> Result<()> {
|
||||
let room_id = discover_admin_room_id(client, admin_token, server_name).await?;
|
||||
let room_url = encode_room_id_for_url(&room_id);
|
||||
let command = format!("make-user-admin @{localpart}:{server_name}");
|
||||
let command = format!("!admin users make-user-admin @{localpart}:{server_name}");
|
||||
admin_room_send_and_poll(client, admin_token, server_name, &room_url, &command, |body| {
|
||||
let lower = body.to_ascii_lowercase();
|
||||
if lower.starts_with("done") || lower.contains("made") && lower.contains("admin") {
|
||||
|
|
@ -834,7 +834,7 @@ pub async fn promote_user_to_admin(
|
|||
format!(
|
||||
"matrix: admin room make-user-admin for @{localpart}:{server_name}: \
|
||||
no success response within 15 seconds. \
|
||||
Verify the admin room accepts 'make-user-admin @user:server' commands."
|
||||
Verify the admin room accepts '!admin users make-user-admin @user:server' commands."
|
||||
)
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue