Fix getReadReceiptsForEvent for unknown threads (#9507)

pull/28788/head^2
Germain 2022-10-26 14:19:36 +01:00 committed by GitHub
parent 0453b264e3
commit 0f1738b098
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -835,6 +835,13 @@ export default class MessagePanel extends React.Component<IProps, IState> {
: 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 ||