summaryrefslogtreecommitdiff
path: root/src/service/admin/mod.rs
diff options
context:
space:
mode:
authorTimo Kösters <timo@koesters.xyz>2023-08-10 17:26:55 +0200
committerTimo Kösters <timo@koesters.xyz>2023-08-10 17:26:55 +0200
commit606b25b9e73b467f44912bf10d2d4c299e9dbd2d (patch)
treea5eb41312a2c356d7d98854ac02944cb81680f86 /src/service/admin/mod.rs
parentfd9e52a559303989740cb64deb273eefea9d3958 (diff)
downloadconduit-606b25b9e73b467f44912bf10d2d4c299e9dbd2d.zip
improvement: more forgiving admin command syntax
Diffstat (limited to 'src/service/admin/mod.rs')
-rw-r--r--src/service/admin/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/service/admin/mod.rs b/src/service/admin/mod.rs
index 6c3e3d0..0fe5edf 100644
--- a/src/service/admin/mod.rs
+++ b/src/service/admin/mod.rs
@@ -287,7 +287,7 @@ impl Service {
// Parse and process a message from the admin room
async fn process_admin_message(&self, room_message: String) -> RoomMessageEventContent {
- let mut lines = room_message.lines();
+ let mut lines = room_message.lines().filter(|l| !l.trim().is_empty());
let command_line = lines.next().expect("each string has at least one line");
let body: Vec<_> = lines.collect();