force sane permissions for user-initiated subscriptions

This commit is contained in:
or-else
2019-02-27 16:52:47 +03:00
parent 93e6d388b6
commit ff619da2b7
8 changed files with 37 additions and 22 deletions
+2 -2
View File
@@ -122,8 +122,8 @@ class MessagesView extends React.Component {
// And show "loading" spinner.
this.setState({ fetchingMessages: true });
}
const setQuery = Tinode.isNewGroupTopicName(this.props.topic) ?
this.props.newGroupTopicParams : undefined;
const setQuery = (this.props.newTopicParams && this.props.newTopicParams._topicName == this.props.topic) ?
this.props.newTopicParams : undefined;
topic.subscribe(getQuery.build(), setQuery)
.then((ctrl) => {
if (this.state.topic != ctrl.topic) {