3
0
mirror of https://github.com/ergochat/ergo.git synced 2025-06-04 05:47:40 +02:00

fix confusion between lastSeen and lastActive

This commit is contained in:
Shivaram Lingamneni 2020-03-02 03:06:57 -05:00
parent d72037725b
commit 5447fc79ff

View File

@ -308,16 +308,16 @@ func (server *Server) RunClient(conn clientConn, proxyLine string) {
client.run(session, proxyLine) client.run(session, proxyLine)
} }
func (server *Server) AddAlwaysOnClient(account ClientAccount, chnames []string, lastActive time.Time) { func (server *Server) AddAlwaysOnClient(account ClientAccount, chnames []string, lastSeen time.Time) {
now := time.Now().UTC() now := time.Now().UTC()
config := server.Config() config := server.Config()
if lastActive.IsZero() { if lastSeen.IsZero() {
lastActive = now lastSeen = now
} }
client := &Client{ client := &Client{
lastSeen: now, lastSeen: lastSeen,
lastActive: lastActive, lastActive: now,
channels: make(ChannelSet), channels: make(ChannelSet),
ctime: now, ctime: now,
languages: server.Languages().Default(), languages: server.Languages().Default(),