We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 17a8f17 commit 20b3d45Copy full SHA for 20b3d45
1 file changed
services/user-feeds/src/delivery/mediums/discord/services/discord-payload-builder.service.ts
@@ -612,11 +612,16 @@ export class DiscordPayloadBuilderService {
612
): DiscordTextDisplayV2 {
613
return {
614
type: DISCORD_COMPONENT_TYPE_TO_NUMBER[DiscordComponentType.TextDisplay],
615
- content: this.replacePlaceholdersInString(
616
- article,
617
- textDisplay.content,
618
- replacePlaceholderOptions
619
- ).trim(),
+ content:
+ this.replacePlaceholdersInString(
+ article,
+ textDisplay.content,
+ replacePlaceholderOptions
620
+ /**
621
+ * this is a zero-width space, not an empty string!
622
+ * (avoids Discord rejecting empty pplaceholders)
623
+ */
624
+ ).trim() || "",
625
};
626
}
627
0 commit comments