From 2c542650d3b4ed1626a55a7af1254bce46cef8c6 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 15 Dec 2022 14:07:34 +0100 Subject: [PATCH] [Glitch] Fix wasteful request to /api/v1/custom_emojis when not logged in Port 76d3dc633f18cea76e4d8d53f11a700ab2ec2794 to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/containers/mastodon.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/containers/mastodon.js b/app/javascript/flavours/glitch/containers/mastodon.js index 6c92376d81..dd7623a813 100644 --- a/app/javascript/flavours/glitch/containers/mastodon.js +++ b/app/javascript/flavours/glitch/containers/mastodon.js @@ -27,8 +27,9 @@ store.dispatch(hydrateAction); // check for deprecated local settings store.dispatch(checkDeprecatedLocalSettings()); -// load custom emojis -store.dispatch(fetchCustomEmojis()); +if (initialState.meta.me) { + store.dispatch(fetchCustomEmojis()); +} const createIdentityContext = state => ({ signedIn: !!state.meta.me,