Implement changes to MSC2285 (private read receipts) (#7993)
This commit is contained in:
parent
eca8494c66
commit
99543a7858
4 changed files with 16 additions and 9 deletions
|
@ -23,6 +23,7 @@ import { MatrixEvent } from 'matrix-js-sdk/src/models/event';
|
|||
import { Relations } from "matrix-js-sdk/src/models/relations";
|
||||
import { logger } from 'matrix-js-sdk/src/logger';
|
||||
import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
|
||||
import { ReceiptType } from "matrix-js-sdk/src/@types/read_receipts";
|
||||
import { M_BEACON_INFO } from 'matrix-js-sdk/src/@types/beacon';
|
||||
|
||||
import shouldHideEvent from '../../shouldHideEvent';
|
||||
|
@ -847,7 +848,7 @@ export default class MessagePanel extends React.Component<IProps, IState> {
|
|||
}
|
||||
const receipts: IReadReceiptProps[] = [];
|
||||
room.getReceiptsForEvent(event).forEach((r) => {
|
||||
if (!r.userId || r.type !== "m.read" || r.userId === myUserId) {
|
||||
if (!r.userId || ![ReceiptType.Read, ReceiptType.ReadPrivate].includes(r.type) || r.userId === myUserId) {
|
||||
return; // ignore non-read receipts and receipts from self.
|
||||
}
|
||||
if (MatrixClientPeg.get().isUserIgnored(r.userId)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue