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:
parent
a4b2e0c0d8
commit
e96d9157a9
9 changed files with 39 additions and 35 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue