Browse Source

Increase timeout between join messages from 5 to 10 minutes

pull/2860/head
Gabe Kangas 2 years ago
parent
commit
604e1fdbaa
No known key found for this signature in database
GPG Key ID: 4345B2060657F330
  1. 4
      core/chat/server.go

4
core/chat/server.go

@ -91,9 +91,9 @@ func (s *Server) Addclient(conn *websocket.Conn, user *user.User, accessToken st @@ -91,9 +91,9 @@ func (s *Server) Addclient(conn *websocket.Conn, user *user.User, accessToken st
ConnectedAt: time.Now(),
}
// Do not send user re-joined broadcast message if they've been active within 5 minutes.
// Do not send user re-joined broadcast message if they've been active within 10 minutes.
shouldSendJoinedMessages := data.GetChatJoinMessagesEnabled()
if previouslyLastSeen, ok := _lastSeenCache[user.ID]; ok && time.Since(previouslyLastSeen) < time.Minute*5 {
if previouslyLastSeen, ok := _lastSeenCache[user.ID]; ok && time.Since(previouslyLastSeen) < time.Minute*10 {
shouldSendJoinedMessages = false
}

Loading…
Cancel
Save