From 41859bdb7375669cec71ff7cf36c003e20daa308 Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Thu, 5 Feb 2009 23:31:53 +0000 Subject: [PATCH] Merged revisions 173773 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r173773 | mmichelson | 2009-02-05 17:28:19 -0600 (Thu, 05 Feb 2009) | 7 lines Properly set "seen" and "unseen" flags when moving messages from the new to the old folder when using IMAP for voicemail storage (closes issue #13905) Reported by: jaroth Patches: foldermove_v2.patch uploaded by jaroth (license 50) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@173775 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_voicemail.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index b9ec0a6d21..138b024c23 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -5286,9 +5286,12 @@ static int save_to_folder(struct ast_vm_user *vmu, struct vm_state *vms, int msg 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)) {