Commit 70c6dd5e61

70c6dd5e61f0f633e68b5708fa4c5577be10718c

parent: 31f8e04503

Unsigned

Darafei Praliaskouski <me@komzpa.net> · 2026-07-10 14:28 UTC
committer: <strk@kbt.io>

fix: run redactions asynchronously

Layout: unified · split

src/commands/redact.rs +13 −13
@@ -93,19 +93,19 @@ impl RedactCommand {
9393 if let Some(room) = self.servers.find_room(buffer) {
9494 let room = room.room().clone();
9595
96 match self.servers.runtime().block_on(room.redact(
97 &event_id,
98 reason.as_deref(),
99 None,
100 )) {
101 Ok(_) => (),
102 Err(error) => Weechat::print(&format!(
103 "{}Failed to redact {}: {}",
104 Weechat::prefix(Prefix::Error),
105 event_id,
106 error
107 )),
108 }
96 Weechat::spawn(async move {
97 if let Err(error) =
98 room.redact(&event_id, reason.as_deref(), None).await
99 {
100 Weechat::print(&format!(
101 "{}Failed to redact {}: {}",
102 Weechat::prefix(Prefix::Error),
103 event_id,
104 error
105 ));
106 }
107 })
108 .detach();
109109 } else {
110110 Weechat::print(
111111 "The /redact command needs to be run in a Matrix room buffer.",