fix(chat): 修复一键清理未读失败
This commit is contained in:
@@ -131,6 +131,16 @@ func (s *Service) MarkRead(ctx context.Context, principal Principal, conversatio
|
||||
return s.repo.MarkRead(ctx, principal, conversationID)
|
||||
}
|
||||
|
||||
func (s *Service) MarkAllAdminConversationsRead(ctx context.Context, adminID uint64) error {
|
||||
if s.repo == nil {
|
||||
return ErrDependencyUnavailable
|
||||
}
|
||||
if adminID == 0 {
|
||||
return ErrPermissionDenied
|
||||
}
|
||||
return s.repo.MarkAllAdminConversationsRead(ctx, adminID)
|
||||
}
|
||||
|
||||
func (s *Service) TransferConversation(ctx context.Context, principal Principal, conversationID uint64, req TransferRequest) error {
|
||||
if s.repo == nil {
|
||||
return ErrDependencyUnavailable
|
||||
|
||||
Reference in New Issue
Block a user