From d67dcc889a124a70a25fd6eab7677952e3f33ab4 Mon Sep 17 00:00:00 2001 From: Jordan Wright Date: Thu, 23 Feb 2017 23:23:05 -0600 Subject: [PATCH] Don't overwrite status to email opened if the user has already clicked the link or submitted data. Fixes #529 --- controllers/route.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/route.go b/controllers/route.go index 91e56d8e..ce6ec676 100644 --- a/controllers/route.go +++ b/controllers/route.go @@ -145,7 +145,7 @@ func PhishTracker(w http.ResponseWriter, r *http.Request) { c.AddEvent(models.Event{Email: rs.Email, Message: models.EVENT_OPENED, Details: string(rj)}) // Don't update the status if the user already clicked the link // or submitted data to the campaign - if rs.Status == models.STATUS_SUCCESS { + if rs.Status == models.EVENT_CLICKED || rs.Status == models.EVENT_DATA_SUBMIT { http.ServeFile(w, r, "static/images/pixel.png") return }