gatewayd: strip a leading mention of this bot; recognise approval commands

This commit is contained in:
2026-09-24 04:33:03 -07:00
parent b45ca14c14
commit 365e50081d
6 changed files with 267 additions and 28 deletions
+3 -1
View File
@@ -7,7 +7,7 @@ use std::time::{SystemTime, UNIX_EPOCH};
use crate::deliver::{LOOP_DOWN, deliver};
use crate::mm::{Post, typing};
use crate::serve::{Gateway, Stop};
use crate::sessions::{BUSY, Batch, Ignored, Pushed, Route};
use crate::sessions::{BUSY, Batch, Ignored, M4B_COMMAND, Pushed, Route};
use crate::state::InFlight;
use crate::ws::WsError;
use crate::ws::conn::Ws;
@@ -81,6 +81,8 @@ impl Gateway {
}
Route::Ignore(_) => {}
Route::Reply { thread, text } => self.post(&thread.channel, &thread.root, &text),
// Until the approvals module is wired in (task 15), M4a's notice.
Route::Approval { thread, .. } => self.post(&thread.channel, &thread.root, M4B_COMMAND),
Route::Queue(message) => {
if message.joins_thread {
self.state.join_thread(&message.thread.root)?;