uint64_t modseq;
if (strcmp(name, "CHANGEDSINCE") == 0) {
+ if (cmd->client->nonpermanent_modseqs) {
+ client_send_command_error(cmd,
+ "FETCH CHANGEDSINCE can't be used with non-permanent modseqs");
+ return FALSE;
+ }
if (!imap_arg_get_atom(*args, &str) ||
str_to_uint64(str, &modseq) < 0) {
client_send_command_error(cmd,
}
if (strcasecmp(name, "UNCHANGEDSINCE") == 0) {
+ if (ctx->cmd->client->nonpermanent_modseqs) {
+ client_send_command_error(ctx->cmd,
+ "STORE UNCHANGEDSINCE can't be used with non-permanent modseqs");
+ return FALSE;
+ }
if (str_to_uint64(value, &ctx->max_modseq) < 0) {
client_send_command_error(ctx->cmd,
"Invalid modseq");
bool imap_fetch_modseq_init(struct imap_fetch_init_context *ctx)
{
+ if (ctx->fetch_ctx->client->nonpermanent_modseqs) {
+ ctx->error = "FETCH MODSEQ can't be used with non-permanent modseqs";
+ return FALSE;
+ }
(void)client_enable(ctx->fetch_ctx->client, MAILBOX_FEATURE_CONDSTORE);
imap_fetch_add_handler(ctx, IMAP_FETCH_HANDLER_FLAG_BUFFERED,
NULL, fetch_modseq, NULL);