Fix error when forwarding a crosspost lacks author

This commit is contained in:
Cadence Ember
2026-08-14 09:51:00 +12:00
parent b7fa7c3e2d
commit 7229206d09
+1 -2
View File
@@ -641,8 +641,7 @@ async function messageToEvent(message, guild, options = {}, di) {
html = "* " + html
}
const flags = message.flags || 0
if (flags & DiscordTypes.MessageFlags.IsCrosspost) {
if (((message.flags || 0) & DiscordTypes.MessageFlags.IsCrosspost) && message.author?.username) {
body = `[↷ ${message.author.username}]\n` + body
html = `↷ <strong>${message.author.username}</strong><br>` + html
}