Browse Source

Recognize admin commands without : after tag

Very useful since many Matrix clients don't insert : after user tags
askstate
Jonathan Flueren 3 years ago
parent
commit
f5e3b0e2dd
  1. 3
      src/service/rooms/timeline/mod.rs

3
src/service/rooms/timeline/mod.rs

@ -443,7 +443,8 @@ impl Service {
)?;
let server_user = format!("@conduit:{}", services().globals.server_name());
let to_conduit = body.starts_with(&format!("{server_user}: "));
let to_conduit = body.starts_with(&format!("{server_user}: "))
|| body.starts_with(&format!("{server_user} "));
// This will evaluate to false if the emergency password is set up so that
// the administrator can execute commands as conduit

Loading…
Cancel
Save