From 1e8aff072a7e7d356ee3a1894c6b74966d8e11af 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 1f762f4271685e30373b15a2e204f8edff59d349 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,