Skip to content

Commit

Permalink
Fix: condition to address email (#4)
Browse files Browse the repository at this point in the history
Fix: condition to address email
  • Loading branch information
huuhait committed May 31, 2024
2 parents d153280 + 2536855 commit aa2e10b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/consumer/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,11 @@ func (c *Consumer) handleEvent(eventConf *config.Event, payload, signer string)
content = html.UnescapeString(content)

var toAddress string
if len(record.User.Email) > 0 {
toAddress = record.User.Email
emailData, ok := record.Data["email"].(string)
if ok {
toAddress = emailData
} else {
toAddress = record.Data["email"].(string)
toAddress = record.User.Email
}

email := Email{
Expand Down

0 comments on commit aa2e10b

Please sign in to comment.