Normalize links and images based on post's URL

This commit is contained in:
2024-07-22 11:27:15 -07:00
parent b5468bced2
commit 1106377550
7 changed files with 89 additions and 15 deletions

View File

@@ -7,26 +7,28 @@ use crate::SanitizeError;
#[derive(Error, Debug)]
pub enum ServerError {
#[error("notmuch")]
#[error("notmuch: {0}")]
NotmuchError(#[from] notmuch::NotmuchError),
#[error("flatten")]
FlattenError,
#[error("mail parse error")]
#[error("mail parse error: {0}")]
MailParseError(#[from] MailParseError),
#[error("IO error")]
#[error("IO error: {0}")]
IoError(#[from] std::io::Error),
#[error("attachement not found")]
PartNotFound,
#[error("sqlx error")]
#[error("sqlx error: {0}")]
SQLXError(#[from] sqlx::Error),
#[error("html sanitize error")]
#[error("html sanitize error: {0}")]
SanitizeError(#[from] SanitizeError),
#[error("UTF8 error")]
#[error("UTF8 error: {0}")]
Utf8Error(#[from] Utf8Error),
#[error("FromUTF8 error")]
#[error("FromUTF8 error: {0}")]
FromUtf8Error(#[from] FromUtf8Error),
#[error("error")]
#[error("error: {0}")]
StringError(String),
#[error("impossible")]
#[error("invalid url: {0}")]
UrlParseError(#[from] url::ParseError),
#[error("impossible: {0}")]
InfaillibleError(#[from] Infallible),
}