mirror of
https://github.com/plankanban/planka.git
synced 2025-07-23 07:09:44 +02:00
feat: Google Chat notifications (#867)
This commit is contained in:
parent
9699fbe76a
commit
8fd0f682d9
6 changed files with 65 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
const buildAndSendSlackMessage = async (card, actorUser) => {
|
||||
await sails.helpers.utils.sendSlackMessage(`*${card.name}* was deleted by ${actorUser.name}`);
|
||||
const buildAndSendMessage = async (card, actorUser, send) => {
|
||||
await send(`*${card.name}* was deleted by ${actorUser.name}`);
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
|
@ -56,7 +56,11 @@ module.exports = {
|
|||
});
|
||||
|
||||
if (sails.config.custom.slackBotToken) {
|
||||
buildAndSendSlackMessage(card, inputs.actorUser);
|
||||
buildAndSendMessage(card, inputs.actorUser, sails.helpers.utils.sendSlackMessage);
|
||||
}
|
||||
|
||||
if (sails.config.custom.googleChatWebhookUrl) {
|
||||
buildAndSendMessage(card, inputs.actorUser, sails.helpers.utils.sendGoogleChatMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue