fix: use FilterValue

This commit is contained in:
Maas Lalani 2023-06-15 12:05:07 -04:00
parent ec14061785
commit 3412cb20d2
No known key found for this signature in database
GPG key ID: 5A6ED5CBF1A0A000

View file

@ -26,11 +26,7 @@ func (m Model) sendEmailCmd() tea.Cmd {
return func() tea.Msg {
attachments := make([]string, len(m.Attachments.Items()))
for i, a := range m.Attachments.Items() {
at, ok := a.(attachment)
if !ok {
continue
}
attachments[i] = string(at)
attachments[i] = a.FilterValue()
}
err := sendEmail(strings.Split(m.To.Value(), TO_SEPARATOR), m.From.Value(), m.Subject.Value(), m.Body.Value(), attachments)
if err != nil {