Cleanup unused message embedding code
Fixup some warnings
This commit is contained in:
@@ -72,11 +72,12 @@ pub fn strip_summary_boilerplate(summary: &str) -> String {
|
||||
|
||||
// Remove any remaining leading markdown bold markers
|
||||
if text.starts_with("**")
|
||||
&& let Some(end) = text[2..].find("**") {
|
||||
// Keep the content between ** but remove the markers
|
||||
let bold_content = &text[2..2 + end];
|
||||
text = format!("{}{}", bold_content, &text[4 + end..]);
|
||||
}
|
||||
&& let Some(end) = text[2..].find("**")
|
||||
{
|
||||
// Keep the content between ** but remove the markers
|
||||
let bold_content = &text[2..2 + end];
|
||||
text = format!("{}{}", bold_content, &text[4 + end..]);
|
||||
}
|
||||
|
||||
text.trim().to_string()
|
||||
}
|
||||
@@ -141,10 +142,7 @@ pub async fn generate_daily_summaries(
|
||||
if let Some(dt) = msg_dt {
|
||||
let date = dt.date_naive();
|
||||
if date >= start && date <= end {
|
||||
messages_by_date
|
||||
.entry(date)
|
||||
.or_default()
|
||||
.push(msg);
|
||||
messages_by_date.entry(date).or_default().push(msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user