Consider polls as message events for rendering redactions (#7944)

This commit is contained in:
Michael Telatynski 2022-03-02 14:27:02 +00:00 committed by GitHub
parent 71ddd9d78d
commit 0f4125dfd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1664,7 +1664,7 @@ export default class EventTile extends React.Component<IProps, IState> {
// XXX this'll eventually be dynamic based on the fields once we have extensible event types // XXX this'll eventually be dynamic based on the fields once we have extensible event types
const messageTypes = [EventType.RoomMessage, EventType.Sticker]; const messageTypes = [EventType.RoomMessage, EventType.Sticker];
function isMessageEvent(ev: MatrixEvent): boolean { function isMessageEvent(ev: MatrixEvent): boolean {
return (messageTypes.includes(ev.getType() as EventType)); return (messageTypes.includes(ev.getType() as EventType)) || M_POLL_START.matches(ev.getType());
} }
export function haveTileForEvent(e: MatrixEvent, showHiddenEvents?: boolean): boolean { export function haveTileForEvent(e: MatrixEvent, showHiddenEvents?: boolean): boolean {