(ctx context.Context, in *getReviewInput)
| 136 | } |
| 137 | |
| 138 | func (s *Server) handleGetReview(ctx context.Context, in *getReviewInput) (*reviewDetailOutput, error) { |
| 139 | p, err := s.requireAccountScope(ctx) |
| 140 | if err != nil { |
| 141 | return nil, err |
| 142 | } |
| 143 | msg, err := s.requireOwnedReview(ctx, p.User.ID, in.ID) |
| 144 | if err != nil { |
| 145 | return nil, err |
| 146 | } |
| 147 | view := messageViewFromIdentity(msg) |
| 148 | // messageViewFromIdentity only exposes review_status for outbound (the |
| 149 | // agent /messages contract never surfaced inbound holds). A /reviews item |
| 150 | // is always a held message of EITHER direction, and its review lifecycle |
| 151 | // lives in m.Status — surface it so clients see pending_review on inbound |
| 152 | // holds too. |
| 153 | view.HITLStatus = msg.Status |
| 154 | return &reviewDetailOutput{Body: view}, nil |
| 155 | } |
| 156 | |
| 157 | func (s *Server) handleApproveReview(ctx context.Context, in *approveReviewInput) (*approveOutput, error) { |
| 158 | p, err := s.requireAccountScope(ctx) |
nothing calls this directly
no test coverage detected