changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: Fetch IMAP flags from server. This makes us sync read/answered/... flags with unix.

changeset 7413: 9c36e8f222fb
parent 7412: cae3f2645bdf
child 7414: cf97441287ed
author: Ori Bernstein <ori@eigenstate.org>
date: Thu, 10 Oct 2019 11:52:22 -0700
files: sys/src/cmd/upas/fs/imap.c
description: Fetch IMAP flags from server. This makes us sync read/answered/... flags with unix.
     1.1--- a/sys/src/cmd/upas/fs/imap.c
     1.2+++ b/sys/src/cmd/upas/fs/imap.c
     1.3@@ -221,7 +221,7 @@ static struct{
     1.4 	char	*flag;
     1.5 	int	e;
     1.6 } ftab[] = {
     1.7-	"Answered",	Fanswered,
     1.8+	"\\Answered",	Fanswered,
     1.9 	"\\Deleted",	Fdeleted,
    1.10 	"\\Draft",		Fdraft,
    1.11 	"\\Flagged",	Fflagged,
    1.12@@ -850,8 +850,8 @@ imap4fetch(Mailbox *mb, Message *m, uvlo
    1.13 	imap = mb->aux;
    1.14 	if(imap->flags & Fgmail)
    1.15 		l = gmaildiscount(m, o, l);
    1.16-	idprint(imap, "uid fetch %lud (body.peek[]<%llud.%lud>)\n", (ulong)m->imapuid, o, l);
    1.17-	imap4cmd(imap, "uid fetch %lud (body.peek[]<%llud.%lud>)", (ulong)m->imapuid, o, l);
    1.18+	idprint(imap, "uid fetch %lud (flags body.peek[]<%llud.%lud>)\n", (ulong)m->imapuid, o, l);
    1.19+	imap4cmd(imap, "uid fetch %lud (flags body.peek[]<%llud.%lud>)", (ulong)m->imapuid, o, l);
    1.20 	if(!isokay(imap4resp0(imap, mb, m))){
    1.21 		eprint("imap: imap fetch failed\n");
    1.22 		return -1;