From a8effa2efa0bc41173bf086742bbe615ee733091 Mon Sep 17 00:00:00 2001 From: Daniel Kilimnik Date: Tue, 25 Mar 2025 18:46:43 +0100 Subject: Save and server thumbnails locally (#88) Fixes #83 Fixes #86 Fixes #87 --- web/src/index.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'web/src') diff --git a/web/src/index.js b/web/src/index.js index 273ad7e..9f545b8 100644 --- a/web/src/index.js +++ b/web/src/index.js @@ -29,10 +29,8 @@ const params = new URLSearchParams(document.location.search) if (params.has('config')) { INDEX = params.get("config") } -// This is updated from packs/index.json -let HOMESERVER_URL = "https://matrix-client.matrix.org" -const makeThumbnailURL = mxc => `${HOMESERVER_URL}/_matrix/media/v3/thumbnail/${mxc.slice(6)}?height=128&width=128&method=scale` +const makeThumbnailURL = mxc => `${PACKS_BASE_URL}/thumbnails/${mxc.split("/").slice(-1)[0]}` // We need to detect iOS webkit because it has a bug related to scrolling non-fixed divs // This is also used to fix scrolling to sections on Element iOS @@ -165,7 +163,6 @@ class App extends Component { return } const indexData = await indexRes.json() - HOMESERVER_URL = indexData.homeserver_url || HOMESERVER_URL if (indexData.giphy_api_key !== undefined) { setGiphyAPIKey(indexData.giphy_api_key, indexData.giphy_mxc_prefix) } -- cgit v1.2.3