From dbc3a9fbb8017cf91404d50be9986b89a1a56275 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 5 Jun 2024 13:02:34 +0300 Subject: Don't prompt for giphy api key by default --- web/src/giphy.js | 2 +- web/src/index.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'web/src') diff --git a/web/src/giphy.js b/web/src/giphy.js index 16dcae3..3e804bc 100644 --- a/web/src/giphy.js +++ b/web/src/giphy.js @@ -3,7 +3,7 @@ import * as widgetAPI from "./widget-api.js"; import {SearchBox} from "./search-box.js"; const GIPHY_SEARCH_DEBOUNCE = 1000 -let GIPHY_API_KEY = "" +let GIPHY_API_KEY = "HQku8974Uq5MZn3MZns46kXn2R4GDm75" let GIPHY_MXC_PREFIX = "mxc://giphy.mau.dev/" export function giphyIsEnabled() { diff --git a/web/src/index.js b/web/src/index.js index ff570da..273ad7e 100644 --- a/web/src/index.js +++ b/web/src/index.js @@ -166,7 +166,9 @@ class App extends Component { } const indexData = await indexRes.json() HOMESERVER_URL = indexData.homeserver_url || HOMESERVER_URL - setGiphyAPIKey(indexData.giphy_api_key, indexData.giphy_mxc_prefix) + if (indexData.giphy_api_key !== undefined) { + setGiphyAPIKey(indexData.giphy_api_key, indexData.giphy_mxc_prefix) + } // TODO only load pack metadata when scrolled into view? for (const packFile of indexData.packs) { let packRes -- cgit v1.2.3