Skip to content

Commit

Permalink
Fix no opt-in mails when existing subscribers subscriber to new opt-i…
Browse files Browse the repository at this point in the history
…n lists. Closes #1257.
  • Loading branch information
knadh committed Mar 25, 2023
1 parent 5aedc3a commit 152bd37
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/core/subscribers.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ func (c *Core) InsertSubscriber(sub models.Subscriber, listIDs []int, listUUIDs
}
}

// Fetch the subscriber'out full data. If the subscriber already existed and wasn't
// Fetch the subscriber's full data. If the subscriber already existed and wasn't
// created, the id will be empty. Fetch the details by e-mail then.
out, err := c.GetSubscriber(sub.ID, "", sub.Email)
if err != nil {
Expand Down Expand Up @@ -379,6 +379,11 @@ func (c *Core) UpdateSubscriberWithLists(id int, sub models.Subscriber, listIDs
return models.Subscriber{}, err
}

if !preconfirm && c.constants.SendOptinConfirmation {
// Send a confirmation e-mail (if there are any double opt-in lists).
c.h.SendOptinConfirmation(out, listIDs)
}

return out, nil
}

Expand Down

0 comments on commit 152bd37

Please sign in to comment.