Browse Source

No longer save chat ban state locally. Closes #1518

pull/1525/head
Gabe Kangas 4 years ago
parent
commit
cae02f0902
  1. 5
      webroot/js/app-standalone-chat.js
  2. 6
      webroot/js/app.js

5
webroot/js/app-standalone-chat.js

@ -102,15 +102,14 @@ export default class StandaloneChat extends Component {
// If this is the first time setting the config // If this is the first time setting the config
// then setup chat if it's enabled. // then setup chat if it's enabled.
const chatBlocked = getLocalStorage('owncast_chat_blocked'); if (!this.hasConfiguredChat && !chatDisabled) {
if (!chatBlocked && !this.hasConfiguredChat && !chatDisabled) {
this.setupChatAuth(); this.setupChatAuth();
} }
this.hasConfiguredChat = true; this.hasConfiguredChat = true;
this.setState({ this.setState({
canChat: !chatBlocked, canChat: !chatDisabled,
configData: { configData: {
...data, ...data,
}, },

6
webroot/js/app.js

@ -223,15 +223,14 @@ export default class App extends Component {
// If this is the first time setting the config // If this is the first time setting the config
// then setup chat if it's enabled. // then setup chat if it's enabled.
const chatBlocked = getLocalStorage('owncast_chat_blocked'); if (!this.hasConfiguredChat && !chatDisabled) {
if (!chatBlocked && !this.hasConfiguredChat && !chatDisabled) {
this.setupChatAuth(); this.setupChatAuth();
} }
this.hasConfiguredChat = true; this.hasConfiguredChat = true;
this.setState({ this.setState({
canChat: !chatBlocked, canChat: !chatDisabled,
configData: { configData: {
...data, ...data,
summary: summary && addNewlines(summary), summary: summary && addNewlines(summary),
@ -569,7 +568,6 @@ export default class App extends Component {
} }
handleBlockedChat() { handleBlockedChat() {
setLocalStorage('owncast_chat_blocked', true);
this.disableChat(); this.disableChat();
} }

Loading…
Cancel
Save