show cancel events as hidden events if we wouldn't usually render them

pull/21833/head
Zoe 2020-02-24 16:51:06 +00:00
parent 381cbbabb0
commit 91b85cd060
1 changed files with 9 additions and 0 deletions

View File

@ -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];
}