IMAP SEARCH by sequence number fix
This commit is contained in:
@@ -2,6 +2,15 @@
|
||||
|
||||
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## [0.5.2] - 2024-01-xx
|
||||
|
||||
## Added
|
||||
|
||||
### Changed
|
||||
|
||||
### Fixed
|
||||
- IMAP command `SEARCH <seqnum>` is using UIDs rather than sequence numbers.
|
||||
|
||||
## [0.5.1] - 2024-01-02
|
||||
|
||||
## Added
|
||||
|
||||
@@ -125,7 +125,7 @@ impl SessionData {
|
||||
) -> Result<search::Response, StatusResponse> {
|
||||
// Run query
|
||||
let (result_set, include_highest_modseq) = self
|
||||
.query(arguments.filter, &mailbox, &prev_saved_search, is_uid)
|
||||
.query(arguments.filter, &mailbox, &prev_saved_search)
|
||||
.await?;
|
||||
|
||||
// Obtain modseq
|
||||
@@ -250,7 +250,6 @@ impl SessionData {
|
||||
imap_filter: Vec<Filter>,
|
||||
mailbox: &SelectedMailbox,
|
||||
prev_saved_search: &Option<Option<Arc<Vec<ImapId>>>>,
|
||||
is_uid: bool,
|
||||
) -> Result<(ResultSet, bool), StatusResponse> {
|
||||
// Obtain message ids
|
||||
let mut filters = Vec::with_capacity(imap_filter.len() + 1);
|
||||
@@ -431,11 +430,7 @@ impl SessionData {
|
||||
return Err(StatusResponse::no("No saved search found."));
|
||||
}
|
||||
} else {
|
||||
for id in mailbox
|
||||
.sequence_to_ids(&sequence, is_uid || uid_filter)
|
||||
.await?
|
||||
.keys()
|
||||
{
|
||||
for id in mailbox.sequence_to_ids(&sequence, uid_filter).await?.keys() {
|
||||
set.insert(*id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,9 +75,7 @@ impl SessionData {
|
||||
is_uid: bool,
|
||||
) -> Result<Response, StatusResponse> {
|
||||
// Run query
|
||||
let (result_set, _) = self
|
||||
.query(arguments.filter, &mailbox, &None, is_uid)
|
||||
.await?;
|
||||
let (result_set, _) = self.query(arguments.filter, &mailbox, &None).await?;
|
||||
|
||||
// Synchronize mailbox
|
||||
if !result_set.results.is_empty() {
|
||||
|
||||
Reference in New Issue
Block a user