fix: recording not being sent if mail enable was not checked
This commit is contained in:
@@ -3356,6 +3356,8 @@ type QSLBulkUpdate struct {
|
||||
SentDate string `json:"sent_date"` // YYYYMMDD — "" = unchanged
|
||||
RcvdDate string `json:"rcvd_date"` // YYYYMMDD — "" = unchanged
|
||||
Via string `json:"via"` // QSL_VIA — "" = unchanged
|
||||
Notes string `json:"notes"` // NOTES — "" = unchanged
|
||||
Comment string `json:"comment"` // COMMENT — "" = unchanged
|
||||
}
|
||||
|
||||
// BulkUpdateQSL applies paper-QSL sent/received status, dates and via to the
|
||||
@@ -3388,6 +3390,12 @@ func (a *App) BulkUpdateQSL(ids []int64, u QSLBulkUpdate) (int, error) {
|
||||
if v := strings.TrimSpace(u.Via); v != "" {
|
||||
q.QSLVia, changed = v, true
|
||||
}
|
||||
if v := strings.TrimSpace(u.Notes); v != "" {
|
||||
q.Notes, changed = v, true
|
||||
}
|
||||
if v := strings.TrimSpace(u.Comment); v != "" {
|
||||
q.Comment, changed = v, true
|
||||
}
|
||||
if changed {
|
||||
if a.qso.Update(a.ctx, q) == nil {
|
||||
n++
|
||||
@@ -4207,9 +4215,12 @@ func (a *App) saveQSORecording(q *qso.QSO) {
|
||||
return
|
||||
}
|
||||
applog.Printf("qso-rec: saved %s", path)
|
||||
// Auto-send the recording once the file exists. Give the operator visible
|
||||
// feedback either way — silently skipping (no e-mail known) was confusing.
|
||||
if es, _ := a.GetEmailSettings(); es.Enabled && es.AutoSend {
|
||||
// Auto-send the recording once the file exists. Gated ONLY on its own
|
||||
// "auto-send recording" toggle (email.auto_send) — NOT the SMTP panel's
|
||||
// master "Enabled" flag, mirroring the eQSL-card auto-send. (Requiring
|
||||
// Enabled silently skipped sending with no log when only this box was on.)
|
||||
// Give the operator visible feedback either way.
|
||||
if es, _ := a.GetEmailSettings(); es.AutoSend {
|
||||
if strings.TrimSpace(qc.Email) == "" {
|
||||
applog.Printf("qso-rec: %s not e-mailed — no recipient address known", qc.Callsign)
|
||||
a.toast(fmt.Sprintf("Recording saved — no e-mail for %s, not sent", qc.Callsign))
|
||||
@@ -5669,7 +5680,9 @@ func uploadColumnFor(service string) string {
|
||||
|
||||
// FindQSOsForUpload returns QSOs whose sent status for the given service
|
||||
// matches sentStatus ("" = blank). Powers the QSL Manager's Select required.
|
||||
func (a *App) FindQSOsForUpload(service, sentStatus string) ([]qso.UploadRow, error) {
|
||||
// FindQSOsForUpload returns FULL QSO rows eligible for upload to a service, so
|
||||
// the QSL Manager shows the same rich, column-pickable table as Recent QSOs.
|
||||
func (a *App) FindQSOsForUpload(service, sentStatus string) ([]qso.QSO, error) {
|
||||
if a.qso == nil {
|
||||
return nil, fmt.Errorf("db not initialized")
|
||||
}
|
||||
@@ -5677,7 +5690,7 @@ func (a *App) FindQSOsForUpload(service, sentStatus string) ([]qso.UploadRow, er
|
||||
if col == "" {
|
||||
return nil, fmt.Errorf("unknown service %q", service)
|
||||
}
|
||||
return a.qso.ListForUpload(a.ctx, col, strings.ToUpper(strings.TrimSpace(sentStatus)))
|
||||
return a.qso.ListForUploadFull(a.ctx, col, strings.ToUpper(strings.TrimSpace(sentStatus)))
|
||||
}
|
||||
|
||||
// UploadQSOsManual uploads the given QSO ids to a service on demand
|
||||
|
||||
Reference in New Issue
Block a user