[PLT-7573] Make deactivated user not counted in Town Square member count (#7421)
* make deactivated user not counted in Town Square member count * update app
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ed1363e1bf
Коммит
af81f7e48b
16
app/user.go
16
app/user.go
@@ -917,6 +917,22 @@ func (a *App) UpdateActive(user *model.User, active bool) (*model.User, *model.A
|
|||||||
a.SetStatusOffline(ruser.Id, false)
|
a.SetStatusOffline(ruser.Id, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
teamsForUser, err := a.GetTeamsForUser(user.Id)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, team := range teamsForUser {
|
||||||
|
channelsForUser, err := a.GetChannelsForUser(team.Id, user.Id)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, channel := range *channelsForUser {
|
||||||
|
a.InvalidateCacheForChannelMembers(channel.Id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ruser, nil
|
return ruser, nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user