mirror of
https://github.com/rustmailer/bichon.git
synced 2026-08-03 07:48:34 +02:00
fix(account): update "disabled" semantics
Modified the meaning of "disabled" accounts: they no longer connect to the IMAP server for syncing, but existing data remains accessible for search and queries.
This commit is contained in:
@@ -68,7 +68,7 @@ pub async fn retrieve_email_content(
|
||||
account_id: u64,
|
||||
id: u64,
|
||||
) -> BichonResult<FullMessageContent> {
|
||||
AccountModel::check_account_active(account_id).await?;
|
||||
AccountModel::check_account_exists(account_id).await?;
|
||||
let eml = EML_INDEX_MANAGER
|
||||
.get(account_id, id)
|
||||
.await?
|
||||
|
||||
@@ -33,7 +33,7 @@ pub async fn list_messages_impl(
|
||||
page: u64,
|
||||
page_size: u64,
|
||||
) -> BichonResult<DataPage<Envelope>> {
|
||||
AccountModel::check_account_active(account_id).await?;
|
||||
AccountModel::check_account_exists(account_id).await?;
|
||||
validate_pagination_params(page, page_size)?;
|
||||
ENVELOPE_INDEX_MANAGER
|
||||
.list_mailbox_envelopes(account_id, mailbox_id, page, page_size, true)
|
||||
@@ -62,7 +62,7 @@ pub async fn get_thread_messages(
|
||||
page: u64,
|
||||
page_size: u64,
|
||||
) -> BichonResult<DataPage<Envelope>> {
|
||||
AccountModel::check_account_active(account_id).await?;
|
||||
AccountModel::check_account_exists(account_id).await?;
|
||||
ENVELOPE_INDEX_MANAGER
|
||||
.list_thread_envelopes(account_id, thread_id, page, page_size, true)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user