Live location sharing - add configs to render beacon_info in timeline (#8251)

* add configs to render beacon_info in timeline

Signed-off-by: Kerry Archibald <kerrya@element.io>

* fix copyright

Signed-off-by: Kerry Archibald <kerrya@element.io>

* one more comment

Signed-off-by: Kerry Archibald <kerrya@element.io>

* update beacon identifier

Signed-off-by: Kerry Archibald <kerrya@element.io>

* use special case for beacon_info tile mapper

Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
Kerry
2022-04-08 09:05:26 +00:00
committed by GitHub
parent 03d0969ae3
commit f63923d60f
4 changed files with 71 additions and 1 deletions
+3 -1
View File
@@ -18,6 +18,7 @@ import { MatrixEvent } from "matrix-js-sdk/src/models/event";
import { EventType, MsgType } from "matrix-js-sdk/src/@types/event";
import { M_POLL_START } from "matrix-events-sdk";
import { M_LOCATION } from "matrix-js-sdk/src/@types/location";
import { M_BEACON_INFO } from "matrix-js-sdk/src/@types/beacon";
import SettingsStore from "../settings/SettingsStore";
import { haveRendererForEvent, JitsiEventFactory, JSONEventFactory, pickFactory } from "../events/EventTileFactory";
@@ -72,7 +73,8 @@ export function getEventDisplayInfo(mxEvent: MatrixEvent, hideEvent?: boolean):
eventType !== EventType.RoomMessageEncrypted &&
eventType !== EventType.Sticker &&
eventType !== EventType.RoomCreate &&
!M_POLL_START.matches(eventType)
!M_POLL_START.matches(eventType) &&
!M_BEACON_INFO.matches(eventType)
);
// Some non-info messages want to be rendered in the appropriate bubble column but without the bubble background
const noBubbleEvent = (