From a8b2c6d36b490b2a0453954dde8b5f37f8b7e10d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Thu, 24 Jun 2021 12:24:42 +0200 Subject: [PATCH] Type event MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/TextForEvent.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/TextForEvent.tsx b/src/TextForEvent.tsx index ee9bd53250..b7e9deda8d 100644 --- a/src/TextForEvent.tsx +++ b/src/TextForEvent.tsx @@ -26,6 +26,7 @@ import { RightPanelPhases } from './stores/RightPanelStorePhases'; import { Action } from './dispatcher/actions'; import defaultDispatcher from './dispatcher/dispatcher'; import { SetRightPanelPhasePayload } from './dispatcher/payloads/SetRightPanelPhasePayload'; +import { MatrixEvent } from "matrix-js-sdk/src/models/event"; // These functions are frequently used just to check whether an event has // any text to display at all. For this reason they return deferred values @@ -472,7 +473,7 @@ function textForPowerEvent(event): () => string | null { }); } -function textForPinnedEvent(event): () => JSX.Element | null { +function textForPinnedEvent(event: MatrixEvent): () => JSX.Element | null { if (!SettingsStore.getValue("feature_pinning")) return null; const senderName = event.sender ? event.sender.name : event.getSender();