From 8160b6d9282e43a317c2c15af072868c4432ce6a Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Wed, 16 Feb 2022 14:56:20 -0600 Subject: [PATCH] Fix reply permalinks having undefined room ID's --- shared/hydrogen-vm-render-script.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/shared/hydrogen-vm-render-script.js b/shared/hydrogen-vm-render-script.js index c82efaf..5a12e4a 100644 --- a/shared/hydrogen-vm-render-script.js +++ b/shared/hydrogen-vm-render-script.js @@ -92,12 +92,18 @@ async function mountHydrogen() { }, }; + const room = { + name: roomData.name, + id: roomData.id, + avatarUrl: roomData.avatarUrl, + avatarColorId: roomData.id, + mediaRepository: mediaRepository, + }; + const tilesCreator = makeTilesCreator({ platform, roomVM: { - room: { - mediaRepository, - }, + room, }, timeline, urlCreator, @@ -161,14 +167,6 @@ async function mountHydrogen() { // }, // }; - const room = { - name: roomData.name, - id: roomData.id, - avatarUrl: roomData.avatarUrl, - avatarColorId: roomData.id, - mediaRepository: mediaRepository, - }; - const roomViewModel = new RoomViewModel({ room, ownUserId: 'xxx',