mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 21:03:56 +00:00
mom: add [SILENT] response marker for periodic events
When mom responds with just [SILENT], the status message is deleted and nothing is posted to Slack. Useful for periodic events that check for activity but find nothing to report.
This commit is contained in:
parent
d6809328da
commit
8ba6aa6627
5 changed files with 36 additions and 1 deletions
|
|
@ -62,6 +62,7 @@ export interface SlackContext {
|
|||
setTyping: (isTyping: boolean) => Promise<void>;
|
||||
uploadFile: (filePath: string, title?: string) => Promise<void>;
|
||||
setWorking: (working: boolean) => Promise<void>;
|
||||
deleteMessage: () => Promise<void>;
|
||||
}
|
||||
|
||||
export interface MomHandler {
|
||||
|
|
@ -192,6 +193,10 @@ export class SlackBot {
|
|||
await this.webClient.chat.update({ channel, ts, text });
|
||||
}
|
||||
|
||||
async deleteMessage(channel: string, ts: string): Promise<void> {
|
||||
await this.webClient.chat.delete({ channel, ts });
|
||||
}
|
||||
|
||||
async postInThread(channel: string, threadTs: string, text: string): Promise<void> {
|
||||
await this.webClient.chat.postMessage({ channel, thread_ts: threadTs, text });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue