reject user messages when offline (#1269)

This commit is contained in:
Meisam 2021-07-27 19:42:05 +02:00 committed by GitHub
parent fac06257ad
commit 44f406caf0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,6 +80,11 @@ func (s *ChatServer) userMessageSent(eventData chatClientEvent) {
return
}
// Ignore if the stream in offline
if !getStatus().Online {
return
}
event.User = user.GetUserByToken(eventData.client.accessToken)
// Guard against nil users