An invite may carry its own mail, with the form's fields and a spoken date and time
Test / test (pull_request) Successful in 1m9s
Test / test (pull_request) Successful in 1m9s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GT37Z1Xtfd9pUuQtMTg6Yt
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
01abf79005
commit
cc9f1c5d87
+7
-1
@@ -3082,10 +3082,16 @@ pub async fn submit_answer(
|
||||
let Some((name, who)) = crate::people::who_for(&responses) else {
|
||||
return Err(ServerFnError::new("an invite needs a name, and a phone number or an email"));
|
||||
};
|
||||
let invited = people
|
||||
let mut invited = people
|
||||
.invite(&state, &name, &who, &invite.group, &principal_name(&principal))
|
||||
.await
|
||||
.map_err(|e| ServerFnError::new(format!("invite failed: {e}")))?;
|
||||
// This invite's own words, and the form they draw on: kept with
|
||||
// the invite, so sending it again says the same thing.
|
||||
invited.mail = invite.mail.clone();
|
||||
if invited.mail.is_some() {
|
||||
invited.fields = responses.as_object().cloned().unwrap_or_default();
|
||||
}
|
||||
if let Some(map) = responses.as_object_mut() {
|
||||
map.insert("invited".to_string(), serde_json::to_value(&invited).unwrap_or_default());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user