You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-11 20:22:36 +03:00
Use UnstableValue for all location constants (#7388)
This commit is contained in:
@@ -18,6 +18,7 @@ import React, { createRef } from 'react';
|
||||
import { EventType, MsgType } from "matrix-js-sdk/src/@types/event";
|
||||
import { Relations } from 'matrix-js-sdk/src/models/relations';
|
||||
import { POLL_START_EVENT_TYPE } from "matrix-js-sdk/src/@types/polls";
|
||||
import { LOCATION_EVENT_TYPE } from 'matrix-js-sdk/src/@types/location';
|
||||
|
||||
import * as sdk from '../../../index';
|
||||
import SettingsStore from "../../../settings/SettingsStore";
|
||||
@@ -127,8 +128,10 @@ export default class MessageEvent extends React.Component<IProps> implements IMe
|
||||
}
|
||||
}
|
||||
|
||||
if ((type && type === "org.matrix.msc3488.location") ||
|
||||
(type && type === EventType.RoomMessage && msgtype && msgtype === MsgType.Location)) {
|
||||
if (
|
||||
LOCATION_EVENT_TYPE.matches(type) ||
|
||||
(type === EventType.RoomMessage && msgtype === MsgType.Location)
|
||||
) {
|
||||
// TODO: tidy this up once location sharing is out of labs
|
||||
if (SettingsStore.getValue("feature_location_share")) {
|
||||
BodyType = sdk.getComponent('messages.MLocationBody');
|
||||
|
||||
Reference in New Issue
Block a user