From cae02f09022d18c57b45c5859605b526c6c1bb3a Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Thu, 11 Nov 2021 15:39:56 -0800 Subject: [PATCH] No longer save chat ban state locally. Closes #1518 --- webroot/js/app-standalone-chat.js | 5 ++--- webroot/js/app.js | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/webroot/js/app-standalone-chat.js b/webroot/js/app-standalone-chat.js index efc1b0a83..18663d66a 100644 --- a/webroot/js/app-standalone-chat.js +++ b/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 // then setup chat if it's enabled. - const chatBlocked = getLocalStorage('owncast_chat_blocked'); - if (!chatBlocked && !this.hasConfiguredChat && !chatDisabled) { + if (!this.hasConfiguredChat && !chatDisabled) { this.setupChatAuth(); } this.hasConfiguredChat = true; this.setState({ - canChat: !chatBlocked, + canChat: !chatDisabled, configData: { ...data, }, diff --git a/webroot/js/app.js b/webroot/js/app.js index 73d2a79eb..2f3475090 100644 --- a/webroot/js/app.js +++ b/webroot/js/app.js @@ -223,15 +223,14 @@ export default class App extends Component { // If this is the first time setting the config // then setup chat if it's enabled. - const chatBlocked = getLocalStorage('owncast_chat_blocked'); - if (!chatBlocked && !this.hasConfiguredChat && !chatDisabled) { + if (!this.hasConfiguredChat && !chatDisabled) { this.setupChatAuth(); } this.hasConfiguredChat = true; this.setState({ - canChat: !chatBlocked, + canChat: !chatDisabled, configData: { ...data, summary: summary && addNewlines(summary), @@ -569,7 +568,6 @@ export default class App extends Component { } handleBlockedChat() { - setLocalStorage('owncast_chat_blocked', true); this.disableChat(); }