about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/hashtag_timeline/index.js
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-10-08 07:15:50 +0200
committerClaire <claire.github-309c@sitedethib.com>2022-10-09 18:23:15 +0200
commit90c6b0aed60858c4714b0b946c454d88f808ea1f (patch)
tree80f81ef0d242777f581488827dd70670b0b1d852 /app/javascript/flavours/glitch/features/hashtag_timeline/index.js
parent60e2cdd81a43b3f5d85042df16fc69b110f00705 (diff)
[Glitch] Fix trying to connect to streaming API when logged out in web UI
Port d4b0aa74500419730525025b05513235aa477841 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/hashtag_timeline/index.js')
-rw-r--r--app/javascript/flavours/glitch/features/hashtag_timeline/index.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/features/hashtag_timeline/index.js b/app/javascript/flavours/glitch/features/hashtag_timeline/index.js
index 812fc4098..38dda85b2 100644
--- a/app/javascript/flavours/glitch/features/hashtag_timeline/index.js
+++ b/app/javascript/flavours/glitch/features/hashtag_timeline/index.js
@@ -96,6 +96,12 @@ class HashtagTimeline extends React.PureComponent {
   }
 
   _subscribe (dispatch, id, tags = {}, local) {
+    const { signedIn } = this.context.identity;
+
+    if (!signedIn) {
+      return;
+    }
+
     let any  = (tags.any || []).map(tag => tag.value);
     let all  = (tags.all || []).map(tag => tag.value);
     let none = (tags.none || []).map(tag => tag.value);