Skip to content

Commit

Permalink
Add isOneClickUnsubscribeRequest reference comment
Browse files Browse the repository at this point in the history
So I don't forget and go hunting for those links again!
  • Loading branch information
mbland committed Mar 31, 2023
1 parent 2f74afb commit b45aa51
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ func (h *Handler) performOperation(
}

func isOneClickUnsubscribeRequest(op *eventOperation, req *apiRequest) bool {
// See the file comments in email/mailer.go for details on the one click
// unsubscribe mechanism for references describing the one click unsubscribe
// mechanism.
return op.Type == UnsubscribeOp &&
req.Method == http.MethodPost &&
req.Params["List-Unsubscribe"] == "One-Click"
Expand Down

0 comments on commit b45aa51

Please sign in to comment.