mirror of
https://github.com/knadh/listmonk.git
synced 2025-02-25 14:55:18 +08:00
Fix incorrect date in bounce insert
This commit is contained in:
parent
27e1e83d0b
commit
81d183b808
1 changed files with 6 additions and 2 deletions
|
@ -70,7 +70,6 @@ func New(opt Opt, q *Queries, lo *log.Logger) (*Manager, error) {
|
|||
switch opt.MailboxType {
|
||||
case "pop":
|
||||
m.mailbox = mailbox.NewPOP(opt.Mailbox)
|
||||
case "imap":
|
||||
default:
|
||||
return nil, errors.New("unknown bounce mailbox type")
|
||||
}
|
||||
|
@ -107,13 +106,18 @@ func (m *Manager) Run() {
|
|||
return
|
||||
}
|
||||
|
||||
date := b.CreatedAt
|
||||
if date.IsZero() {
|
||||
date = time.Now()
|
||||
}
|
||||
|
||||
_, err := m.queries.RecordQuery.Exec(b.SubscriberUUID,
|
||||
b.Email,
|
||||
b.CampaignUUID,
|
||||
b.Type,
|
||||
b.Source,
|
||||
b.Meta,
|
||||
b.CreatedAt,
|
||||
date,
|
||||
m.opt.BounceCount,
|
||||
m.opt.BounceAction)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue