summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonathan Flueren <9669250-JonOfUs@users.noreply.gitlab.com>2023-05-15 19:25:57 +0000
committerJonathan Flueren <9669250-JonOfUs@users.noreply.gitlab.com>2023-05-15 19:25:57 +0000
commitf5e3b0e2dd1c47d6d7dc3a9c21da892472ab57de (patch)
tree892f26304a19646bc9afa97f47a5e163ab2b8cc8 /src
parent1b9e63f4269988a957a2e376355b2dacd2295c08 (diff)
downloadconduit-f5e3b0e2dd1c47d6d7dc3a9c21da892472ab57de.zip
Recognize admin commands without : after tag
Very useful since many Matrix clients don't insert : after user tags
Diffstat (limited to 'src')
-rw-r--r--src/service/rooms/timeline/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/service/rooms/timeline/mod.rs b/src/service/rooms/timeline/mod.rs
index 47f4c65..249b2a2 100644
--- a/src/service/rooms/timeline/mod.rs
+++ b/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