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:
rustmailer
2025-11-24 22:34:40 +08:00
parent e41b26ba0b
commit 089b6885a7
6 changed files with 18 additions and 20 deletions
+1 -1
View File
@@ -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?
+2 -2
View File
@@ -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