Include References: <Message-ID of triggering e-mail>, if any, in the comment notification

This mirrors the ticket_new notification
This commit is contained in:
наб 2023-12-31 21:30:21 +01:00 committed by Conrad Hoffmann
parent 80956c5981
commit 7348b4a29b
3 changed files with 4 additions and 0 deletions

View File

@ -770,6 +770,7 @@ input SubmitCommentEmailInput {
cmd: EmailCmd
resolution: TicketResolution
labelIds: [Int!]
messageId: String!
}
"""

View File

@ -1243,6 +1243,8 @@ func (r *mutationResolver) SubmitCommentEmail(ctx context.Context, trackerID int
}
builder.InsertNotifications(event.ID, &commentID)
builder.InReplyTo(&input.MessageID)
conf := config.ForContext(ctx)
origin := config.GetOrigin(conf, "todo.sr.ht", true)
details := SubmitCommentDetails{

View File

@ -177,6 +177,7 @@ class MailHandler:
input = {
"text": body,
"senderId": sender.id,
"messageId": mail["Message-ID"].removeprefix("<").removesuffix(">"),
}
cmds = ["!resolve", "!resolved", "!reopen"]