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:
Mario Zechner 2025-12-12 22:50:12 +01:00
parent d6809328da
commit 8ba6aa6627
5 changed files with 36 additions and 1 deletions

View file

@ -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;
},
};
}