aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-05 23:28:19 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-05 23:28:19 +0000
commitb8f14a0349a80f319d7298b1e76f86ce3e6f1952 (patch)
treebf12732850bedddff23b182638b9456df9af0a92 /apps/app_voicemail.c
parentff8957c30fd95e9f6fb3fdab4df148958047d6c3 (diff)
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: http://svn.digium.com/svn/asterisk/trunk@173773 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_voicemail.c')
-rw-r--r--apps/app_voicemail.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 1cc1088e5..8b2fc989c 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -5388,9 +5388,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)) {