dovecot-2.2: notify plugin: mailbox_save_using_mail() now sends ...

dovecot at dovecot.org dovecot at dovecot.org
Sun May 20 03:26:35 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/8a4d314ef7d0
changeset: 14534:8a4d314ef7d0
user:      Timo Sirainen <tss at iki.fi>
date:      Fri May 04 19:01:19 2012 +0300
description:
notify plugin: mailbox_save_using_mail() now sends "save" events, not "copy".

diffstat:

 src/plugins/notify/notify-storage.c |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 5d9a5011c1bf -r 8a4d314ef7d0 src/plugins/notify/notify-storage.c
--- a/src/plugins/notify/notify-storage.c	Fri May 04 19:00:04 2012 +0300
+++ b/src/plugins/notify/notify-storage.c	Fri May 04 19:01:19 2012 +0300
@@ -102,8 +102,15 @@
 		ctx->dest_mail = lt->tmp_mail;
 	}
 
-	if ((ret = lbox->super.copy(ctx, mail)) == 0)
+	if ((ret = lbox->super.copy(ctx, mail)) < 0)
+		return -1;
+
+	if (ctx->saving) {
+		/* we came from mailbox_save_using_mail() */
+		notify_contexts_mail_save(ctx->dest_mail);
+	} else {
 		notify_contexts_mail_copy(mail, ctx->dest_mail);
+	}
 	return ret;
 }
 


More information about the dovecot-cvs mailing list