Skip to content

Commit

Permalink
Remove more redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
MidhunSureshR committed Mar 2, 2025
1 parent c989bbf commit 6b61ba9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/stores/room-list-v3/RoomListStoreV3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,7 @@ export class RoomListStoreV3Class extends AsyncStoreWithClient<EmptyObject> {
case "MatrixActions.Room.timeline": {
// Ignore non-live events (backfill) and notification timeline set events (without a room)
if (!payload.isLiveEvent || !payload.isLiveUnfilteredRoomTimelineEvent || !payload.room) return;

const roomId = payload.event.getRoomId();
const room = this.matrixClient?.getRoom(roomId);
if (room) this.addRoomAndEmit(room);
else logger.warn(`Live timeline event ${payload.event.getId()} received without associated room`);
this.addRoomAndEmit(payload.room);
break;
}

Expand Down

0 comments on commit 6b61ba9

Please sign in to comment.