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:
@@ -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 });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user