aboutsummaryrefslogtreecommitdiffstats
path: root/syz-cluster/pkg/api
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2025-06-28 17:30:50 +0200
committerAleksandr Nogikh <nogikh@google.com>2025-07-02 09:13:24 +0000
commit8eca022fb899f81facfd753a892d33ad794e2846 (patch)
tree38e3deed52689f467241e50c885c1c59582d75a0 /syz-cluster/pkg/api
parentd6d4e158298e946390e54d87a0a808a4238a24b4 (diff)
syz-cluster: make report reply tracking more flexible
Replace an UpdateReport() call with a RecordReply(). This will eventually allow us to support the email sender implementations for which we do not immediately know the MessageID of the reported message.
Diffstat (limited to 'syz-cluster/pkg/api')
-rw-r--r--syz-cluster/pkg/api/reporter.go14
1 files changed, 3 insertions, 11 deletions
diff --git a/syz-cluster/pkg/api/reporter.go b/syz-cluster/pkg/api/reporter.go
index e73bdb668..ea83dfbe6 100644
--- a/syz-cluster/pkg/api/reporter.go
+++ b/syz-cluster/pkg/api/reporter.go
@@ -30,16 +30,6 @@ func (client ReporterClient) GetNextReport(ctx context.Context, reporter string)
return postJSON[any, NextReportResp](ctx, client.baseURL+"/reports?"+v.Encode(), nil)
}
-type UpdateReportReq struct {
- MessageID string `json:"message_id"`
-}
-
-// UpdateReport may be used to remember the message ID and the link to the discussion.
-func (client ReporterClient) UpdateReport(ctx context.Context, id string, req *UpdateReportReq) error {
- _, err := postJSON[UpdateReportReq, any](ctx, client.baseURL+"/reports/"+id+"/update", req)
- return err
-}
-
// ConfirmReport should be called to mark a report as sent.
func (client ReporterClient) ConfirmReport(ctx context.Context, id string) error {
_, err := postJSON[any, any](ctx, client.baseURL+"/reports/"+id+"/confirm", nil)
@@ -56,7 +46,9 @@ func (client ReporterClient) UpstreamReport(ctx context.Context, id string, req
}
type RecordReplyReq struct {
- MessageID string `json:"message_id"`
+ MessageID string `json:"message_id"`
+ ReportID string `json:"report_id"`
+ // If ReportID is not set, InReplyTo will help identify the original report.
InReplyTo string `json:"in_reply_to"`
Reporter string `json:"reporter"`
Time time.Time `json:"time"`