Browse Source

reject user messages when offline (#1269)

pull/1279/head
Meisam 4 years ago committed by GitHub
parent
commit
44f406caf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      core/chat/events.go

5
core/chat/events.go

@ -80,6 +80,11 @@ func (s *ChatServer) userMessageSent(eventData chatClientEvent) { @@ -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

Loading…
Cancel
Save