PLT-3921 Fix System Console Recent Active Users (#3856)
* PLT-3921 System Console Recent Active Users
Этот коммит содержится в:
@@ -129,6 +129,28 @@ func (s SqlStatusStore) GetOnline() StoreChannel {
|
||||
return storeChannel
|
||||
}
|
||||
|
||||
func (s SqlStatusStore) GetAllFromTeam(teamId string) StoreChannel {
|
||||
storeChannel := make(StoreChannel)
|
||||
|
||||
go func() {
|
||||
result := StoreResult{}
|
||||
|
||||
var statuses []*model.Status
|
||||
if _, err := s.GetReplica().Select(&statuses,
|
||||
`SELECT s.* FROM Status AS s INNER JOIN
|
||||
TeamMembers AS tm ON tm.TeamId=:TeamId AND s.UserId=tm.UserId`, map[string]interface{}{"TeamId": teamId}); err != nil {
|
||||
result.Err = model.NewLocAppError("SqlStatusStore.GetAllFromTeam", "store.sql_status.get_team_statuses.app_error", nil, err.Error())
|
||||
} else {
|
||||
result.Data = statuses
|
||||
}
|
||||
|
||||
storeChannel <- result
|
||||
close(storeChannel)
|
||||
}()
|
||||
|
||||
return storeChannel
|
||||
}
|
||||
|
||||
func (s SqlStatusStore) ResetAll() StoreChannel {
|
||||
storeChannel := make(StoreChannel)
|
||||
|
||||
|
||||
@@ -275,6 +275,7 @@ type StatusStore interface {
|
||||
Get(userId string) StoreChannel
|
||||
GetOnlineAway() StoreChannel
|
||||
GetOnline() StoreChannel
|
||||
GetAllFromTeam(teamId string) StoreChannel
|
||||
ResetAll() StoreChannel
|
||||
GetTotalActiveUsersCount() StoreChannel
|
||||
UpdateLastActivityAt(userId string, lastActivityAt int64) StoreChannel
|
||||
|
||||
Ссылка в новой задаче
Block a user