-
{ mxEvent.getId() }
-
Beacon "{ description }"
- { latestLocationState ?
-
{ `${latestLocationState.uri} at ${latestLocationState.timestamp}` } :
-
Waiting for location }
+ { displayStatus === BeaconDisplayStatus.Active ?
+
+ :
+ { displayStatus === BeaconDisplayStatus.Loading ?
+ :
+
+ }
+
+ }
);
});
diff --git a/src/utils/EventRenderingUtils.ts b/src/utils/EventRenderingUtils.ts
index c6c7acc991..fd6e518c4f 100644
--- a/src/utils/EventRenderingUtils.ts
+++ b/src/utils/EventRenderingUtils.ts
@@ -81,6 +81,7 @@ export function getEventDisplayInfo(mxEvent: MatrixEvent, hideEvent?: boolean):
(eventType === EventType.RoomMessage && msgtype === MsgType.Emote) ||
M_POLL_START.matches(eventType) ||
M_LOCATION.matches(eventType) ||
+ M_BEACON_INFO.matches(eventType) ||
(
eventType === EventType.RoomMessage &&
M_LOCATION.matches(msgtype)
diff --git a/test/components/views/messages/MBeaconBody-test.tsx b/test/components/views/messages/MBeaconBody-test.tsx
index dc8ec31903..103f003d82 100644
--- a/test/components/views/messages/MBeaconBody-test.tsx
+++ b/test/components/views/messages/MBeaconBody-test.tsx
@@ -17,6 +17,7 @@ limitations under the License.
import React from 'react';
import { mount } from 'enzyme';
import { act } from 'react-dom/test-utils';
+import maplibregl from 'maplibre-gl';
import {
BeaconEvent,
Room,
@@ -24,7 +25,7 @@ import {
} from 'matrix-js-sdk/src/matrix';
import MBeaconBody from '../../../../src/components/views/messages/MBeaconBody';
-import { findByTestId, getMockClientWithEventEmitter, makeBeaconEvent, makeBeaconInfoEvent } from '../../../test-utils';
+import { getMockClientWithEventEmitter, makeBeaconEvent, makeBeaconInfoEvent } from '../../../test-utils';
import { RoomPermalinkCreator } from '../../../../src/utils/permalinks/Permalinks';
import { MediaEventHelper } from '../../../../src/utils/MediaEventHelper';
import MatrixClientContext from '../../../../src/contexts/MatrixClientContext';
@@ -37,7 +38,13 @@ describe('