#include "imap-search-args.h"
#include "imap-expunge.h"
-static bool cmd_expunge_callback(struct client_command_context *cmd)
-{
- if (cmd->client->sync_seen_deletes && !cmd->uid) {
- /* Outlook workaround: session 1 set \Deleted flag and
- session 2 tried to expunge without having seen it yet.
- expunge again. MAILBOX_TRANSACTION_FLAG_REFRESH should
- have caught this already if index files are used. */
- return cmd_expunge(cmd);
- }
-
- client_send_tagline(cmd, "OK Expunge completed.");
- return TRUE;
-}
-
static bool ATTR_NULL(2)
cmd_expunge_finish(struct client_command_context *cmd,
struct mail_search_args *search_args)
}
client->sync_seen_deletes = FALSE;
- if ((client->enabled_features & MAILBOX_FEATURE_QRESYNC) != 0) {
- return cmd_sync(cmd, MAILBOX_SYNC_FLAG_EXPUNGE,
- IMAP_SYNC_FLAG_SAFE, "OK Expunge completed.");
- } else {
- return cmd_sync_callback(cmd, MAILBOX_SYNC_FLAG_EXPUNGE,
- IMAP_SYNC_FLAG_SAFE,
- cmd_expunge_callback);
- }
+ return cmd_sync(cmd, MAILBOX_SYNC_FLAG_EXPUNGE,
+ IMAP_SYNC_FLAG_SAFE, "OK Expunge completed.");
}
bool cmd_uid_expunge(struct client_command_context *cmd)