From 91b85cd0605e3e685ed16e387f778ada3b4a7065 Mon Sep 17 00:00:00 2001 From: Zoe Date: Mon, 24 Feb 2020 16:51:06 +0000 Subject: [PATCH] show cancel events as hidden events if we wouldn't usually render them --- src/components/views/rooms/EventTile.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index bba2310281..3711b5599a 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -100,6 +100,15 @@ export function getHandlerTile(ev) { } } + // sometimes MKeyVerificationConclusion declines to render. Jankily decline to render and + // fall back to showing hidden events, if we're viewing hidden events + if (type === "m.key.verification.cancel" && SettingsStore.getValue("showHiddenEventsInTimeline")) { + const MKeyVerificationConclusion = sdk.getComponent("messages.MKeyVerificationConclusion"); + if (!MKeyVerificationConclusion.prototype._shouldRender.call(null, ev, ev.request)) { + return; + } + } + return ev.isState() ? stateEventTileTypes[type] : eventTileTypes[type]; }