use LocationAssetType (#7965)

* use LocationAssetType

Signed-off-by: Kerry Archibald <kerrya@element.io>

* center icon better

Signed-off-by: Kerry Archibald <kerrya@element.io>

* remove debug

Signed-off-by: Kerry Archibald <kerrya@element.io>

* retrigger all builds

Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
Kerry 2022-03-03 11:04:38 +01:00 committed by GitHub
parent 3572b36648
commit 7aefa34420
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View file

@ -20,7 +20,7 @@ import { logger } from "matrix-js-sdk/src/logger";
import { MatrixEvent } from 'matrix-js-sdk/src/models/event';
import {
ASSET_NODE_TYPE,
ASSET_TYPE_SELF,
LocationAssetType,
ILocationContent,
LOCATION_EVENT_TYPE,
} from 'matrix-js-sdk/src/@types/location';
@ -130,8 +130,8 @@ export default class MLocationBody extends React.Component<IBodyProps, IState> {
export function isSelfLocation(locationContent: ILocationContent): boolean {
const asset = ASSET_NODE_TYPE.findIn(locationContent) as { type: string };
const assetType = asset?.type ?? ASSET_TYPE_SELF;
return assetType == ASSET_TYPE_SELF;
const assetType = asset?.type ?? LocationAssetType.Self;
return assetType == LocationAssetType.Self;
}
interface ILocationBodyContentProps {