From 31691b854ab52d8a10517d7b83b9064154679415 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Tue, 21 Jul 2020 23:16:39 -0500 Subject: [PATCH] Updated GroupTimeline to not connect to stream if no user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Updated: - GroupTimeline to not connect to stream if no user --- app/javascript/gabsocial/features/group_timeline.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/javascript/gabsocial/features/group_timeline.js b/app/javascript/gabsocial/features/group_timeline.js index 6458fb72..47749eb7 100644 --- a/app/javascript/gabsocial/features/group_timeline.js +++ b/app/javascript/gabsocial/features/group_timeline.js @@ -3,6 +3,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes' import { injectIntl, defineMessages } from 'react-intl' import { Link } from 'react-router-dom' import classNames from 'classnames' +import { me } from '../initial_state' import { connectGroupStream } from '../actions/streaming' import { expandGroupTimeline } from '../actions/timelines' import StatusList from '../components/status_list' @@ -53,11 +54,13 @@ class GroupTimeline extends ImmutablePureComponent { dispatch(expandGroupTimeline(id)) - this.disconnect = dispatch(connectGroupStream(id)) + if (!!me) { + this.disconnect = dispatch(connectGroupStream(id)) + } } componentWillUnmount() { - if (this.disconnect) { + if (this.disconnect && !!me) { this.disconnect() this.disconnect = null }