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
update location event types (#8022)
* update types Signed-off-by: Kerry Archibald <kerrya@element.io> * fix tests Signed-off-by: Kerry Archibald <kerrya@element.io> * lint Signed-off-by: Kerry Archibald <kerrya@element.io> * trigger Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
@@ -17,7 +17,7 @@ limitations under the License.
|
||||
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 { LOCATION_EVENT_TYPE } from 'matrix-js-sdk/src/@types/location';
|
||||
import { M_LOCATION } from 'matrix-js-sdk/src/@types/location';
|
||||
import { M_POLL_START } from "matrix-events-sdk";
|
||||
|
||||
import * as sdk from '../../../index';
|
||||
@@ -132,7 +132,7 @@ export default class MessageEvent extends React.Component<IProps> implements IMe
|
||||
|
||||
// TODO: move to eventTypes when location sharing spec stabilises
|
||||
if (
|
||||
LOCATION_EVENT_TYPE.matches(type) ||
|
||||
M_LOCATION.matches(type) ||
|
||||
(type === EventType.RoomMessage && msgtype === MsgType.Location)
|
||||
) {
|
||||
BodyType = sdk.getComponent('messages.MLocationBody');
|
||||
|
||||
Reference in New Issue
Block a user