From 3775dc09436b7af11ad0e754af59daf90e6331bb Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Tue, 29 Oct 2019 17:32:22 +0000 Subject: [PATCH] Add diagnostic log to catch events without an ID This adds some temporary logging to investigate https://github.com/vector-im/riot-web/issues/11120. --- src/components/views/rooms/EventTile.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index 6af2860399..ca83dd1814 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -495,6 +495,12 @@ module.exports = createReactClass({ return null; } const eventId = this.props.mxEvent.getId(); + if (!eventId) { + // XXX: Temporary diagnostic logging for https://github.com/vector-im/riot-web/issues/11120 + console.error("EventTile attempted to get relations for an event without an ID"); + // Use event's special `toJSON` method to log key data. + console.log(JSON.stringify(this.props.mxEvent, null, 4)); + } return this.props.getRelationsForEvent(eventId, "m.annotation", "m.reaction"); },