From 0f1738b09875140ab24407a55f0dfbe5edda8d38 Mon Sep 17 00:00:00 2001 From: Germain Date: Wed, 26 Oct 2022 14:19:36 +0100 Subject: [PATCH] Fix getReadReceiptsForEvent for unknown threads (#9507) --- src/components/structures/MessagePanel.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/structures/MessagePanel.tsx b/src/components/structures/MessagePanel.tsx index 223eb0a6db..56c396750f 100644 --- a/src/components/structures/MessagePanel.tsx +++ b/src/components/structures/MessagePanel.tsx @@ -835,6 +835,13 @@ export default class MessagePanel extends React.Component { : room; const receipts: IReadReceiptProps[] = []; + + if (!receiptDestination) { + logger.debug("Discarding request, could not find the receiptDestination for event: " + + this.context.threadId); + return receipts; + } + receiptDestination.getReceiptsForEvent(event).forEach((r) => { if ( !r.userId ||