diff --git a/src/email.rs b/src/email.rs index 790fe1f..4698c56 100644 --- a/src/email.rs +++ b/src/email.rs @@ -46,6 +46,11 @@ pub const CONFIG: CfgGroup<'static> = CfgGroup { description: "Message-Id of last initial announcement to send In-Reply-To (if applicable).", }, + CfgField::Default { + key: "state-toc", + default: "error: no toc saved", + description: "Recipient of the emails sent.", + }, ], }; diff --git a/src/key_value.rs b/src/key_value.rs index 9a612db..cdfea88 100644 --- a/src/key_value.rs +++ b/src/key_value.rs @@ -80,6 +80,7 @@ impl KeyValueStore { let result = row.get(0)?; Ok(result) } else { + println!(": Keinen Wert für '{key}' gefunden, bitte Datenbank überprüfen!"); Err(rusqlite::Error::QueryReturnedNoRows) } } diff --git a/src/main.rs b/src/main.rs index 712222b..df6c4c0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -417,7 +417,7 @@ fn do_reminder( NYI!("trace/verbose annotations"); // fetch current pad contents & summarize let (current_pad_id, _pad_content, toc, n_topics) = get_pad_info(config, hedgedoc); - let old_toc = config.get("state-toc")?; + let old_toc = config.get("email-state-toc")?; // construct email let human_date = plenum_day.format("%d.%m.%Y"); let subject = if n_topics == 0 { @@ -458,6 +458,7 @@ fn do_reminder( "do we skip ahead to ProgramState::Logged here or do we later add a note to the wiki?" ); } + config.set("state-name", &ProgramState::Reminded.to_string()).ok(); config.set("state-toc", &toc).ok(); Ok(()) @@ -576,7 +577,7 @@ fn do_cleanup( _wiki: &Mediawiki, ) -> Result<(), Box> { NYI!("trace/verbose annotations"); - config.delete("state-toc"); + config.delete("email-state-toc"); config.delete("email-last-message-id"); NYI!("rotate pad links"); NYI!("double-check state for leftovers");