Banned and chat disconnected states will hide chat. Closes #2764

This commit is contained in:
Gabe Kangas
2023-03-13 15:23:14 -07:00
parent 2364293742
commit 0f58f8c0fe
7 changed files with 81 additions and 46 deletions

View File

@ -63,6 +63,7 @@ export enum AppStateEvent {
Offline = 'OFFLINE', // Stream is not live
NeedsRegister = 'NEEDS_REGISTER', // Needs to register a chat user
Fail = 'FAIL', // Error
ChatUserDisabled = 'CHAT_USER_DISABLED', // Chat user is disabled
}
const appStateModel =
@ -97,6 +98,9 @@ const appStateModel =
OFFLINE: {
target: 'goodbye',
},
CHAT_USER_DISABLED: {
target: 'chatUserDisabled',
},
},
},
offline: {
@ -124,6 +128,12 @@ const appStateModel =
},
},
},
chatUserDisabled: {
meta: {
...ONLINE_STATE,
chatAvailable: false,
},
},
},
},
serverFailure: {