mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 07:02:04 +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
|
|
@ -207,6 +207,16 @@ function createSlackContext(event: SlackEvent, slack: SlackBot, state: ChannelSt
|
|||
});
|
||||
await updatePromise;
|
||||
},
|
||||
|
||||
deleteMessage: async () => {
|
||||
updatePromise = updatePromise.then(async () => {
|
||||
if (messageTs) {
|
||||
await slack.deleteMessage(event.channel, messageTs);
|
||||
messageTs = null;
|
||||
}
|
||||
});
|
||||
await updatePromise;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue