render message deleted tile for beacons (#8905)

This commit is contained in:
Kerry 2022-06-27 14:21:22 +02:00 committed by GitHub
parent e7a8dbd04c
commit 5538161acd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View file

@ -23,5 +23,9 @@ import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon";
*/
export const shouldDisplayAsBeaconTile = (event: MatrixEvent): boolean => (
M_BEACON_INFO.matches(event.getType()) &&
!!event.getContent()?.live
(
event.getContent()?.live ||
// redacted beacons should show 'message deleted' tile
event.isRedacted()
)
);