Guard against hopefully impossible situation

This commit is contained in:
Cadence Ember 2026-09-08 18:40:54 +12:00
commit 70b18c8833

View file

@ -1168,7 +1168,7 @@ async function messageToEvent(message, guild, options = {}, di) {
}
// Rich replies
if (repliedToEventRow && !repliedToEventInDifferentRoom) {
if (repliedToEventRow && !repliedToEventInDifferentRoom && events[0]) {
Object.assign(events[0], {
"m.relates_to": {
"m.in_reply_to": {