Detach session activity update from statuses (#6379)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b868aa1dc7
Коммит
0ae6886513
@@ -195,7 +195,6 @@ func SetStatusOnline(userId string, sessionId string, manual bool) {
|
||||
// Only update the database if the status has changed, the status has been manually set,
|
||||
// or enough time has passed since the previous action
|
||||
if status.Status != oldStatus || status.Manual != oldManual || status.LastActivityAt-oldTime > model.STATUS_MIN_UPDATE_TIME {
|
||||
achan := Srv.Store.Session().UpdateLastActivityAt(sessionId, status.LastActivityAt)
|
||||
|
||||
var schan store.StoreChannel
|
||||
if broadcast {
|
||||
@@ -204,10 +203,6 @@ func SetStatusOnline(userId string, sessionId string, manual bool) {
|
||||
schan = Srv.Store.Status().UpdateLastActivityAt(status.UserId, status.LastActivityAt)
|
||||
}
|
||||
|
||||
if result := <-achan; result.Err != nil {
|
||||
l4g.Error(utils.T("api.status.last_activity.error"), userId, sessionId, result.Err)
|
||||
}
|
||||
|
||||
if result := <-schan; result.Err != nil {
|
||||
l4g.Error(utils.T("api.status.save_status.error"), userId, result.Err)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user