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

@ -18,7 +18,7 @@ import { EventStatus, MatrixEvent } from 'matrix-js-sdk/src/models/event';
import { EventType, EVENT_VISIBILITY_CHANGE_TYPE, MsgType, RelationType } from "matrix-js-sdk/src/@types/event";
import { MatrixClient } from 'matrix-js-sdk/src/client';
import { logger } from 'matrix-js-sdk/src/logger';
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';
@ -252,10 +252,10 @@ export function getEventDisplayInfo(mxEvent: MatrixEvent, hideEvent?: boolean):
const noBubbleEvent = (
(eventType === EventType.RoomMessage && msgtype === MsgType.Emote) ||
M_POLL_START.matches(eventType) ||
LOCATION_EVENT_TYPE.matches(eventType) ||
M_LOCATION.matches(eventType) ||
(
eventType === EventType.RoomMessage &&
LOCATION_EVENT_TYPE.matches(msgtype)
M_LOCATION.matches(msgtype)
)
);