diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2025-06-28 17:30:50 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-07-02 09:13:24 +0000 |
| commit | 8eca022fb899f81facfd753a892d33ad794e2846 (patch) | |
| tree | 38e3deed52689f467241e50c885c1c59582d75a0 /syz-cluster/email-reporter/handler.go | |
| parent | d6d4e158298e946390e54d87a0a808a4238a24b4 (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/email-reporter/handler.go')
| -rw-r--r-- | syz-cluster/email-reporter/handler.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/syz-cluster/email-reporter/handler.go b/syz-cluster/email-reporter/handler.go index 78eb8846e..8b0ff6a6c 100644 --- a/syz-cluster/email-reporter/handler.go +++ b/syz-cluster/email-reporter/handler.go @@ -93,11 +93,13 @@ func (h *Handler) report(ctx context.Context, rep *api.SessionReport) error { if err != nil { return fmt.Errorf("failed to send: %w", err) } - - // Now that the report is sent, update the link to the email discussion. - err = h.apiClient.UpdateReport(ctx, rep.ID, &api.UpdateReportReq{ + // Record MessageID so that we could later trace user replies back to it. + _, err = h.apiClient.RecordReply(ctx, &api.RecordReplyReq{ // TODO: for Lore emails, set Link = lore.Link(msgID). MessageID: msgID, + Time: time.Now(), + ReportID: rep.ID, + Reporter: h.reporter, }) if err != nil { return fmt.Errorf("failed to update: %w", err) |
