diff --git a/src/components/views/right_panel/UserInfo.js b/src/components/views/right_panel/UserInfo.js
index 1964b5601c..412bf92831 100644
--- a/src/components/views/right_panel/UserInfo.js
+++ b/src/components/views/right_panel/UserInfo.js
@@ -89,103 +89,6 @@ const DevicesSection = ({devices, userId, loading}) => {
);
};
-const onRoomTileClick = (roomId) => {
- dis.dispatch({
- action: 'view_room',
- room_id: roomId,
- });
-};
-
-const DirectChatsSection = withLegacyMatrixClient(({matrixClient: cli, userId, startUpdating, stopUpdating}) => {
- const onNewDMClick = async () => {
- startUpdating();
- await createRoom({dmUserId: userId});
- stopUpdating();
- };
-
- // TODO: Immutable DMs replaces a lot of this
- // dmRooms will not include dmRooms that we have been invited into but did not join.
- // Because DMRoomMap runs off account_data[m.direct] which is only set on join of dm room.
- // XXX: we potentially want DMs we have been invited to, to also show up here :L
- // especially as logic below concerns specially if we haven't joined but have been invited
- const [dmRooms, setDmRooms] = useState(new DMRoomMap(cli).getDMRoomsForUserId(userId));
-
- // TODO bind the below
- // cli.on("Room", this.onRoom);
- // cli.on("Room.name", this.onRoomName);
- // cli.on("deleteRoom", this.onDeleteRoom);
-
- const accountDataHandler = useCallback((ev) => {
- if (ev.getType() === "m.direct") {
- const dmRoomMap = new DMRoomMap(cli);
- setDmRooms(dmRoomMap.getDMRoomsForUserId(userId));
- }
- }, [cli, userId]);
- useEventEmitter(cli, "accountData", accountDataHandler);
-
- const RoomTile = sdk.getComponent("rooms.RoomTile");
-
- const tiles = [];
- for (const roomId of dmRooms) {
- const room = cli.getRoom(roomId);
- if (room) {
- const myMembership = room.getMyMembership();
- // not a DM room if we have are not joined
- if (myMembership !== 'join') continue;
-
- const them = room.getMember(userId);
- // not a DM room if they are not joined
- if (!them || !them.membership || them.membership !== 'join') continue;
-
- const highlight = room.getUnreadNotificationCount('highlight') > 0;
-
- tiles.push(
-