summaryrefslogtreecommitdiff
path: root/makima/src/server/state.rs
diff options
context:
space:
mode:
Diffstat (limited to 'makima/src/server/state.rs')
-rw-r--r--makima/src/server/state.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/makima/src/server/state.rs b/makima/src/server/state.rs
index 41c336e..15fec6b 100644
--- a/makima/src/server/state.rs
+++ b/makima/src/server/state.rs
@@ -910,6 +910,11 @@ impl AppState {
self.pending_questions.get(&question_id).map(|entry| entry.value().clone())
}
+ /// Check if a pending question exists (either still pending or has a response ready).
+ pub fn has_pending_question(&self, question_id: Uuid) -> bool {
+ self.pending_questions.contains_key(&question_id) || self.question_responses.contains_key(&question_id)
+ }
+
/// Submit a response to a supervisor question.
pub fn submit_question_response(&self, question_id: Uuid, response: String) -> bool {
// Check if the question exists