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
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue