1
0
Fork 0
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:
Maël Gangloff 2024-09-04 15:33:43 +02:00 committed by GitHub
parent 9699fbe76a
commit 8fd0f682d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 65 additions and 9 deletions

View file

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