Fix favourites metaspace not updating (#8594)

This commit is contained in:
Šimon Brandner 2022-05-14 13:45:15 +02:00 committed by GitHub
parent 11eca18450
commit 4c1c12bbc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -960,9 +960,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
};
private onRoomAccountData = (ev: MatrixEvent, room: Room, lastEv?: MatrixEvent) => {
if (!room.isSpaceRoom()) return;
if (ev.getType() === EventType.SpaceOrder) {
if (room.isSpaceRoom() && ev.getType() === EventType.SpaceOrder) {
this.spaceOrderLocalEchoMap.delete(room.roomId); // clear any local echo
const order = ev.getContent()?.order;
const lastOrder = lastEv?.getContent()?.order;