up seafile
This commit is contained in:
+12
-1
@@ -425,7 +425,18 @@ func (a *App) SendEQSL(qsoID int64, templateID int64, jpegB64 string) error {
|
||||
applog.Printf("qsl: send eQSL to %s (%s) failed: %v", to, q.Callsign, err)
|
||||
return err
|
||||
}
|
||||
if err := a.qso.MarkEQSLSent(a.ctx, qsoID, time.Now().UTC().Format("20060102")); err != nil {
|
||||
// Stamp the standard ADIF eqsl_sent flag plus an app-specific timestamp of
|
||||
// the eQSL-card e-mail (APP_OPSLOG_QSL_SENT) — distinct from eqsl_sent, which
|
||||
// an eQSL.cc upload may also set. q came straight from GetByID, so a full
|
||||
// Update rewrites the row unchanged apart from these fields.
|
||||
now := time.Now().UTC()
|
||||
q.EQSLSent = "Y"
|
||||
q.EQSLSentDate = now.Format("20060102")
|
||||
if q.Extras == nil {
|
||||
q.Extras = map[string]string{}
|
||||
}
|
||||
q.Extras["APP_OPSLOG_QSL_SENT"] = now.Format(time.RFC3339)
|
||||
if err := a.qso.Update(a.ctx, q); err != nil {
|
||||
applog.Printf("qsl: eQSL sent to %s but marking failed: %v", q.Callsign, err)
|
||||
return fmt.Errorf("eQSL sent but status not saved: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user