Do not send user joined events to chat clients if stream is not active. Closes #750

This commit is contained in:
Gabe Kangas
2021-02-21 16:21:12 -08:00
parent b47589fa8f
commit 0bfd9f8e1f
3 changed files with 10 additions and 3 deletions

View File

@@ -77,10 +77,11 @@ func (s *server) usernameChanged(msg models.NameChangeEvent) {
}
func (s *server) userJoined(msg models.UserJoinedEvent) {
for _, c := range s.Clients {
c.userJoinedChannel <- msg
if s.listener.IsStreamConnected() {
for _, c := range s.Clients {
c.userJoinedChannel <- msg
}
}
go webhooks.SendChatEventUserJoined(msg)
}