mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-22 03:49:27 +01:00
parent
0b5544831d
commit
b022c34a23
@ -614,7 +614,7 @@ func (am *AccountManager) saveLastSeen(account string, lastSeen map[string]time.
|
|||||||
text, _ := json.Marshal(lastSeen)
|
text, _ := json.Marshal(lastSeen)
|
||||||
val = string(text)
|
val = string(text)
|
||||||
}
|
}
|
||||||
am.server.store.Update(func(tx *buntdb.Tx) error {
|
err := am.server.store.Update(func(tx *buntdb.Tx) error {
|
||||||
if val != "" {
|
if val != "" {
|
||||||
tx.Set(key, val, nil)
|
tx.Set(key, val, nil)
|
||||||
} else {
|
} else {
|
||||||
@ -622,6 +622,9 @@ func (am *AccountManager) saveLastSeen(account string, lastSeen map[string]time.
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
if err != nil {
|
||||||
|
am.server.logger.Error("internal", "error persisting lastSeen", account, err.Error())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (am *AccountManager) loadLastSeen(account string) (lastSeen map[string]time.Time) {
|
func (am *AccountManager) loadLastSeen(account string) (lastSeen map[string]time.Time) {
|
||||||
|
Loading…
Reference in New Issue
Block a user