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/trunk@173773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
bf5358dd26
commit
8f9c8f8b40
1 changed files with 3 additions and 0 deletions
|
@ -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_debug(3, "Copying sequence %s to mailbox %s\n", sequence, mbox(box));
|
||||||
ast_mutex_lock(&vms->lock);
|
ast_mutex_lock(&vms->lock);
|
||||||
|
/* if save to Old folder, put in INBOX as read */
|
||||||
if (box == OLD_FOLDER) {
|
if (box == OLD_FOLDER) {
|
||||||
mail_setflag(vms->mailstream, sequence, "\\Seen");
|
mail_setflag(vms->mailstream, sequence, "\\Seen");
|
||||||
|
mail_clearflag(vms->mailstream, sequence, "\\Unseen");
|
||||||
} else if (box == NEW_FOLDER) {
|
} else if (box == NEW_FOLDER) {
|
||||||
|
mail_setflag(vms->mailstream, sequence, "\\Unseen");
|
||||||
mail_clearflag(vms->mailstream, sequence, "\\Seen");
|
mail_clearflag(vms->mailstream, sequence, "\\Seen");
|
||||||
}
|
}
|
||||||
if (!strcasecmp(mbox(NEW_FOLDER), vms->curbox) && (box == NEW_FOLDER || box == OLD_FOLDER)) {
|
if (!strcasecmp(mbox(NEW_FOLDER), vms->curbox) && (box == NEW_FOLDER || box == OLD_FOLDER)) {
|
||||||
|
|
Loading…
Reference in a new issue