Fix optin e-mails on subscriber addition to single option lists

This commit is contained in:
Kailash Nadh 2020-05-23 12:54:25 +05:30
parent bfe31b75c1
commit f06d6b360d

View file

@ -595,7 +595,7 @@ func sendOptinConfirmation(sub models.Subscriber, listIDs []int64, app *App) err
// Fetch double opt-in lists from the given list IDs.
// Get the list of subscription lists where the subscriber hasn't confirmed.
if err := app.queries.GetSubscriberLists.Select(&lists, sub.ID, nil,
pq.Int64Array(listIDs), nil, models.SubscriptionStatusUnconfirmed, nil); err != nil {
pq.Int64Array(listIDs), nil, models.SubscriptionStatusUnconfirmed, models.ListOptinDouble); err != nil {
app.log.Printf("error fetching lists for opt-in: %s", pqErrMsg(err))
return err
}