修复冻结用户强制下线
This commit is contained in:
@@ -37,6 +37,13 @@ func NewService(repo *Repository) *Service {
|
||||
return &Service{repo: repo}
|
||||
}
|
||||
|
||||
// SetSessionRevoker 设置用户会话撤销回调,例如关闭用户的实时连接。
|
||||
func (s *Service) SetSessionRevoker(revoker func(userID uint64)) {
|
||||
if s.repo != nil {
|
||||
s.repo.SetStatusChangeNotifier(revoker)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Service) List(ctx context.Context, page, pageSize int, query ListQuery) (*PaginatedResult, error) {
|
||||
if s.repo == nil {
|
||||
return nil, ErrDependencyUnavailable
|
||||
|
||||
Reference in New Issue
Block a user