Skip to content

Commit

Permalink
Merge branch 'main' into multipython
Browse files Browse the repository at this point in the history
  • Loading branch information
pyranota authored Jan 8, 2025
2 parents 19ba93b + e47a3aa commit c6b04b9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions backend/windmill-api/src/slack_approvals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ async fn get_modal_blocks(

let created_at_formatted = created_at.format("%Y-%m-%d %H:%M:%S").to_string();

let fallback_message = format!(
let mut message_str = format!(
"A workflow has been suspended and is waiting for approval:\n\n\
*Created by*: {created_by}\n\
*Created at*: {created_at_formatted}\n\
Expand All @@ -1033,7 +1033,10 @@ async fn get_modal_blocks(
*Flow ID*: {parent_job_id_str}\n\n"
);

let mut message_str: String = message.unwrap_or_else(|| fallback_message.as_str()).to_string();
// Append custom message if provided
if let Some(msg) = message {
message_str.push_str(msg);
}

tracing::debug!("Schema: {:#?}", schema);

Expand Down

0 comments on commit c6b04b9

Please sign in to comment.