fix crash on citation with empty msg (only asset) (#92)
All checks were successful
ci/woodpecker/push/publish Pipeline was successful

Co-authored-by: Mylloon <kennel.anri@tutanota.com>
Reviewed-on: #92
This commit is contained in:
Mylloon 2023-04-25 13:30:00 +02:00
parent d3cd6e1346
commit 751c1f1161
Signed by: Forgejo
GPG key ID: E72245C752A07631

View file

@ -115,7 +115,10 @@ export default async (message: Message, client: Client) => {
} }
// Description as post content // Description as post content
embed.setDescription(quoted_post?.content ?? ""); if (quoted_post?.content) {
// Only if content exists and length > 0
embed.setDescription(quoted_post?.content);
}
// Footer // Footer
let footer = `Posté le ${showDate( let footer = `Posté le ${showDate(