Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

785 B
Raw Blame
use crate::util::process_pre_insert::clean_message::clean_subject_snippet::{
    clean_message_subject_snippet, clean_threads_subject_snippet,
};
use crate::util::process_pre_insert::clean_message::remove_trailing_br_tags::{
    remove_trailing_br_tags, remove_trailing_br_tags_threads,
};
use models_email::service;

mod clean_subject_snippet;
mod remove_trailing_br_tags;

// cleans the html of a thread
pub fn clean_threads(threads: &mut Vec<service::thread::Thread>) {
    clean_threads_subject_snippet(threads);

    remove_trailing_br_tags_threads(threads)
}

// cleans the html of a message
#[tracing::instrument(skip(message))]
pub fn clean_message(message: &mut service::message::Message) {
    clean_message_subject_snippet(message);

    remove_trailing_br_tags(message);
}