]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Fix FETCH SNIPPET
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sat, 17 Feb 2018 22:53:12 +0000 (00:53 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 19 Feb 2018 08:29:01 +0000 (10:29 +0200)
1) _BUFFERED flag wasn't set, which caused a missing space before the "SNIPPET".
2) It caused \Seen flag to be added to the mail

src/imap/imap-fetch-body.c

index 3c154d68781b5d82ab9373d0143c81ec33d41a93..54b76a29e26964129481b9c7a2d682b2a6f562d7 100644 (file)
@@ -668,7 +668,7 @@ bool imap_fetch_snippet_init(struct imap_fetch_init_context *ctx)
        }
 
        ctx->fetch_ctx->fetch_data |= MAIL_FETCH_BODY_SNIPPET;
-       ctx->fetch_ctx->flags_update_seen = TRUE;
-       imap_fetch_add_handler(ctx, 0, "NIL", fetch_snippet, (void *) lazy);
+       imap_fetch_add_handler(ctx, IMAP_FETCH_HANDLER_FLAG_BUFFERED,
+                              "NIL", fetch_snippet, (void *) lazy);
        return TRUE;
 }