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:
Kerry 2022-03-10 19:03:31 +01:00 committed by GitHub
parent a4b2e0c0d8
commit e96d9157a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 39 additions and 35 deletions

View file

@ -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');