mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 13:19:44 +02:00
Added notifications about card deletion
Co-authored-by: Elllone <elllone@diklosgroup.ru> on-behalf-of: @DiklosGroup <contact@diklosgroup.ru>
This commit is contained in:
parent
38316d7ff7
commit
4fa62325a2
1 changed files with 12 additions and 0 deletions
|
@ -2,6 +2,10 @@ const buildAndSendMessage = async (card, actorUser, send) => {
|
|||
await send(`*${card.name}* was deleted by ${actorUser.name}`);
|
||||
};
|
||||
|
||||
const buildAndSendMessageForTelegramBot = async (card, actorUser, send) => {
|
||||
await send(`<b>${card.name}</b> was deleted by ${actorUser.name}`);
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
inputs: {
|
||||
record: {
|
||||
|
@ -59,6 +63,14 @@ module.exports = {
|
|||
buildAndSendMessage(card, inputs.actorUser, sails.helpers.utils.sendSlackMessage);
|
||||
}
|
||||
|
||||
if (sails.config.custom.telegramChatId) {
|
||||
buildAndSendMessageForTelegramBot(
|
||||
card,
|
||||
inputs.actorUser,
|
||||
sails.helpers.utils.sendTelegramMessage,
|
||||
);
|
||||
}
|
||||
|
||||
if (sails.config.custom.googleChatWebhookUrl) {
|
||||
buildAndSendMessage(card, inputs.actorUser, sails.helpers.utils.sendGoogleChatMessage);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue