Skip to content

Commit

Permalink
chore: send full message without trimming to the addon event (#8230)
Browse files Browse the repository at this point in the history
  • Loading branch information
gastonfournier authored Sep 24, 2024
1 parent 72bdce9 commit 5ac32b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/addons/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)` : ''}`,
},
});
}
Expand Down

0 comments on commit 5ac32b3

Please sign in to comment.