mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
Only show moderator notification once. Closes #2578
This commit is contained in:
parent
59b7f6dcbf
commit
e48e274c79
@ -33,6 +33,7 @@ const SERVER_STATUS_POLL_DURATION = 5000;
|
||||
const ACCESS_TOKEN_KEY = 'accessToken';
|
||||
|
||||
let serverStatusRefreshPoll: ReturnType<typeof setInterval>;
|
||||
let hasBeenModeratorNotified = false;
|
||||
|
||||
// Server status is what gets updated such as viewer count, durations,
|
||||
// stream title, online/offline state, etc.
|
||||
@ -284,7 +285,10 @@ export const ClientConfigStore: FC = () => {
|
||||
setChatAuthenticated,
|
||||
setCurrentUser,
|
||||
);
|
||||
setChatMessages(currentState => [...currentState, message as ChatEvent]);
|
||||
if (!hasBeenModeratorNotified) {
|
||||
setChatMessages(currentState => [...currentState, message as ChatEvent]);
|
||||
hasBeenModeratorNotified = true;
|
||||
}
|
||||
break;
|
||||
case MessageType.CHAT:
|
||||
setChatMessages(currentState => [...currentState, message as ChatEvent]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user