Don't show a message bubble around polls (#7374)

* Don't show a message bubble around polls

* Update res/css/views/rooms/_EventBubbleTile.scss
This commit is contained in:
Michael Telatynski 2021-12-15 19:47:57 +00:00 committed by GitHub
parent d31aa12156
commit 11aa6c7435
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 2 deletions

View file

@ -119,6 +119,7 @@ export function getEventDisplayInfo(mxEvent: MatrixEvent): {
tileHandler: string;
isBubbleMessage: boolean;
isLeftAlignedBubbleMessage: boolean;
noBubbleEvent: boolean;
} {
const content = mxEvent.getContent();
const msgtype = content.msgtype;
@ -144,7 +145,11 @@ export function getEventDisplayInfo(mxEvent: MatrixEvent): {
eventType !== EventType.RoomMessage &&
eventType !== EventType.Sticker &&
eventType !== EventType.RoomCreate &&
eventType !== POLL_START_EVENT_TYPE.name
!POLL_START_EVENT_TYPE.matches(eventType)
);
// Some non-info messages want to be rendered in the appropriate bubble column but without the bubble background
const noBubbleEvent = (
POLL_START_EVENT_TYPE.matches(eventType)
);
// If we're showing hidden events in the timeline, we should use the
@ -158,7 +163,7 @@ export function getEventDisplayInfo(mxEvent: MatrixEvent): {
isInfoMessage = true;
}
return { tileHandler, isInfoMessage, isBubbleMessage, isLeftAlignedBubbleMessage };
return { tileHandler, isInfoMessage, isBubbleMessage, isLeftAlignedBubbleMessage, noBubbleEvent };
}
export function isVoiceMessage(mxEvent: MatrixEvent): boolean {