gatewayd: strip a leading mention of this bot; recognise approval commands
This commit is contained in:
@@ -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)?;
|
||||
|
||||
Reference in New Issue
Block a user