From 8eca022fb899f81facfd753a892d33ad794e2846 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Sat, 28 Jun 2025 17:30:50 +0200 Subject: 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. --- syz-cluster/pkg/api/reporter.go | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'syz-cluster/pkg/api') 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"` -- cgit mrf-deployment