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
|
@ -20,7 +20,7 @@ import { EventStatus, MatrixEvent } from 'matrix-js-sdk/src/models/event';
|
|||
import { EventType, RelationType } from "matrix-js-sdk/src/@types/event";
|
||||
import { Relations } from 'matrix-js-sdk/src/models/relations';
|
||||
import { RoomMemberEvent } from "matrix-js-sdk/src/models/room-member";
|
||||
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 { MatrixClientPeg } from '../../../MatrixClientPeg';
|
||||
|
@ -526,10 +526,10 @@ function canForward(event: MatrixEvent): boolean {
|
|||
function isLocationEvent(event: MatrixEvent): boolean {
|
||||
const eventType = event.getType();
|
||||
return (
|
||||
LOCATION_EVENT_TYPE.matches(eventType) ||
|
||||
M_LOCATION.matches(eventType) ||
|
||||
(
|
||||
eventType === EventType.RoomMessage &&
|
||||
LOCATION_EVENT_TYPE.matches(event.getContent().msgtype)
|
||||
M_LOCATION.matches(event.getContent().msgtype)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue