Don't prompt for giphy api key by default

This commit is contained in:
Tulir Asokan
2024-06-05 13:02:34 +03:00
parent 47f17fde45
commit dbc3a9fbb8
3 changed files with 4 additions and 15 deletions

View File

@ -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() {

View File

@ -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