Skip to main content

record_answer

Function record_answer 

Source
pub fn record_answer(
    store: &Questions,
    id: &str,
    reply: &str,
    title: Option<&str>,
) -> Result<String>
Expand description

Record the owner’s magi answer --reply on question id (a full id) and return what to print. The terminal’s direct path and a chat turn’s control bridge (crate::chat_control::Operation::Answer) both land here, so a chat answer is the same ordinary answer whatever the turn’s sandbox.

A choice reply is resolved against the offered labels; a free-text question takes the reply verbatim. title is the literal replacement for the posting gate’s use my text choice and is refused anywhere else. Side effects of the answer itself (an obsolete approval’s dismissal saving its run record) happen in Questions::update; existing consumers act on the rest.