diff --git a/hive-c0re/src/matrix.rs b/hive-c0re/src/matrix.rs index e973f18e..e0bf1ebf 100644 --- a/hive-c0re/src/matrix.rs +++ b/hive-c0re/src/matrix.rs @@ -1182,7 +1182,12 @@ pub async fn invite_user( // the persisted hive Space. let room_id = match room_override { Some(r) if r.starts_with('#') => resolve_room_alias(client, admin_token, r).await?, - Some(r) => r.to_owned(), + Some(r) if r.starts_with('!') => r.to_owned(), + Some(r) => anyhow::bail!( + "matrix: --room {r:?} is neither a room id nor an alias; \ + prefix with '!' for a room id (!abc:server) or '#' for an \ + alias (#name:server)" + ), None => std::fs::read_to_string(hive_space_room_id_path()) .map(|s| s.trim().to_owned()) .context(