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

@ -29,7 +29,7 @@ import {
M_POLL_END,
PollStartEvent,
} from "matrix-events-sdk";
import { LOCATION_EVENT_TYPE } from "matrix-js-sdk/src/@types/location";
import { M_LOCATION } from "matrix-js-sdk/src/@types/location";
import { _t } from './languageHandler';
import * as Roles from './Roles';
@ -339,7 +339,7 @@ function textForMessageEvent(ev: MatrixEvent): () => string | null {
const content = ev.getContent();
const msgtype = content.msgtype;
if (LOCATION_EVENT_TYPE.matches(type) || LOCATION_EVENT_TYPE.matches(msgtype)) {
if (M_LOCATION.matches(type) || M_LOCATION.matches(msgtype)) {
return textForLocationEvent(ev);
}