From f34c1609c3c42f095b59bc068620f342894f94ed Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Thu, 5 Jan 2023 12:33:28 +0100 Subject: [PATCH] Disable bubbles for broadcasts (#9860) --- src/utils/EventRenderingUtils.ts | 3 ++- test/utils/EventRenderingUtils-test.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utils/EventRenderingUtils.ts b/src/utils/EventRenderingUtils.ts index 49e6330783..ad8061973b 100644 --- a/src/utils/EventRenderingUtils.ts +++ b/src/utils/EventRenderingUtils.ts @@ -94,7 +94,8 @@ export function getEventDisplayInfo( (eventType === EventType.RoomMessage && msgtype === MsgType.Emote) || M_POLL_START.matches(eventType) || M_BEACON_INFO.matches(eventType) || - isLocationEvent(mxEvent); + isLocationEvent(mxEvent) || + eventType === VoiceBroadcastInfoEventType; // If we're showing hidden events in the timeline, we should use the // source tile when there's no regular tile for an event and also for diff --git a/test/utils/EventRenderingUtils-test.ts b/test/utils/EventRenderingUtils-test.ts index 2f07822489..4416a58386 100644 --- a/test/utils/EventRenderingUtils-test.ts +++ b/test/utils/EventRenderingUtils-test.ts @@ -32,7 +32,7 @@ describe("getEventDisplayInfo", () => { "isInfoMessage": false, "isLeftAlignedBubbleMessage": false, "isSeeingThroughMessageHiddenForModeration": false, - "noBubbleEvent": false, + "noBubbleEvent": true, } `); }); @@ -46,7 +46,7 @@ describe("getEventDisplayInfo", () => { "isInfoMessage": true, "isLeftAlignedBubbleMessage": false, "isSeeingThroughMessageHiddenForModeration": false, - "noBubbleEvent": false, + "noBubbleEvent": true, } `); });