mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 13:37:09 -04:00
added a condition to filter unwanted webhooks
This commit is contained in:
parent
4a45d32d4f
commit
b9f74c5add
1 changed files with 7 additions and 2 deletions
|
@ -135,11 +135,16 @@ if (Meteor.isServer) {
|
|||
|
||||
const userId = params.userId ? params.userId : integrations[0].userId;
|
||||
const user = ReactiveCache.getUser(userId);
|
||||
const text = `${params.user} ${TAPi18n.__(
|
||||
const descriptionText = TAPi18n.__(
|
||||
description,
|
||||
quoteParams,
|
||||
user.getLanguage(),
|
||||
)}\n${params.url}`;
|
||||
);
|
||||
|
||||
// If you don't want a hook, set the webhook description to "-".
|
||||
if (descriptionText === "-") return;
|
||||
|
||||
const text = `${params.user} ${descriptionText}\n${params.url}`;
|
||||
|
||||
if (text.length === 0) return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue