forked from cadence/out-of-your-element
m->d: Gracefully handle replies to redacted event
This commit is contained in:
parent
f79833c444
commit
7756a34a5f
3 changed files with 59 additions and 1 deletions
|
@ -509,6 +509,8 @@ async function eventToMessage(event, guild, di) {
|
|||
const fileReplyContentAlternative = attachmentEmojis.get(repliedToEvent.content.msgtype)
|
||||
if (fileReplyContentAlternative) {
|
||||
contentPreview = " " + fileReplyContentAlternative
|
||||
} else if (repliedToEvent.unsigned?.redacted_because) {
|
||||
contentPreview = " (in reply to a deleted message)"
|
||||
} else {
|
||||
const repliedToContent = repliedToEvent.content.formatted_body || repliedToEvent.content.body
|
||||
const contentPreviewChunks = chunk(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue