[asterisk-commits] mmichelson: trunk r173773 - /trunk/apps/app_voicemail.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Feb 5 17:28:19 CST 2009


Author: mmichelson
Date: Thu Feb  5 17:28:19 2009
New Revision: 173773

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=173773
Log:
Properly set "seen" and "unseen" flags when moving messages from the new to the old folder when using IMAP for voicemail storage


Modified:
    trunk/apps/app_voicemail.c

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=173773&r1=173772&r2=173773
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Thu Feb  5 17:28:19 2009
@@ -5388,9 +5388,12 @@
 	
 	ast_debug(3, "Copying sequence %s to mailbox %s\n", sequence, mbox(box));
 	ast_mutex_lock(&vms->lock);
+	/* if save to Old folder, put in INBOX as read */
 	if (box == OLD_FOLDER) {
 		mail_setflag(vms->mailstream, sequence, "\\Seen");
+		mail_clearflag(vms->mailstream, sequence, "\\Unseen");
 	} else if (box == NEW_FOLDER) {
+		mail_setflag(vms->mailstream, sequence, "\\Unseen");
 		mail_clearflag(vms->mailstream, sequence, "\\Seen");
 	}
 	if (!strcasecmp(mbox(NEW_FOLDER), vms->curbox) && (box == NEW_FOLDER || box == OLD_FOLDER)) {




More information about the asterisk-commits mailing list