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