mirror of https://github.com/gophish/gophish
Merge pull request #138 from gophish/119-stick-result-status
Avoid Overwriting Click/Data Submit Event. Fixes #119pull/140/head
commit
5e11895c23
|
@ -102,6 +102,12 @@ func PhishTracker(w http.ResponseWriter, r *http.Request) {
|
|||
Logger.Println(err)
|
||||
}
|
||||
c.AddEvent(models.Event{Email: rs.Email, Message: models.EVENT_OPENED})
|
||||
// Don't update the status if the user already clicked the link
|
||||
// or submitted data to the campaign
|
||||
if rs.Status == models.STATUS_SUCCESS {
|
||||
w.Write([]byte(""))
|
||||
return
|
||||
}
|
||||
err = rs.UpdateStatus(models.EVENT_OPENED)
|
||||
if err != nil {
|
||||
Logger.Println(err)
|
||||
|
|
Loading…
Reference in New Issue