1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-11 00:08:30 +01:00

chore: send full message without trimming to the addon event (#8230)

Address
https://github.com/Unleash/unleash/pull/8219#discussion_r1772884465
This commit is contained in:
Gastón Fournier 2024-09-24 11:43:08 +02:00 committed by GitHub
parent 72bdce98de
commit 5ac32b3713
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -75,7 +75,8 @@ export default class SlackAddon extends Addon {
const { text: formattedMessage, url: featureLink } =
this.msgFormatter.format(event);
const text = formattedMessage.substring(0, 3000);
const maxLength = 3000;
const text = formattedMessage.substring(0, maxLength);
const requests = slackChannels.map((channel) => {
const body = {
username,
@ -149,7 +150,7 @@ export default class SlackAddon extends Addon {
url,
channels: slackChannels,
username,
message: text,
message: `${formattedMessage}${text.length < formattedMessage.length ? ` (trimmed to ${maxLength} characters)` : ''}`,
},
});
}