[Kde-pim] Review Request 107179: Use IMAP standard flags for replied messages

Chuso Perez kde at chuso.net
Wed Sep 18 21:12:36 BST 2013



> On Aug. 16, 2013, 10:01 a.m., Christian Mollekopf wrote:
> > I think what akoandi/kmime/messageflags.h specifies an akonadi specific set of message flags, and it is the resources responsibility to translate the flag to one with the same semantics available for the backend. By chance the flags chosen are the same as IMAP, but they could really be anything. The IMAP resource already translates Akonadi::MessageFlags::Answered to the IMAP version, and I don't know why we have Akonadi::MessageFlags::Replied at all as that seems to represent the same.
> > 
> > IMO we can apply this patch and should then deprecate Akonadi::MessageFlags::Replied and replace it's use by Akonadi::MessageFlags::Answered everywhere.
> > I'd still like a confirmation of kevin, volker or or whoever else knows if I understood this correctly.
> 
> Dan Vrátil wrote:
>     If would rather deprecate Akonadi::MessageFlags::Answered. If Replied and Answered are equivalent and we've been using Replied everywhere since forever, why change it? As you said the correct translation from Akonadi::MessageFlags should be handled by respective Akonadi resources so the actual patch should go to ResoureTask::{to,from}AkonadiFlags() in case of IMAP resource and analogically to maildir/mbox resources.
>     
>     By deprecating Replied and switching to Answered we would end up with half of items in Akonadi DB having Replied flag and the other half having Answered flag, thus you would have to modify conditions in kmail and all mail resources from "if (akonadiFlag == Akonadi::MessageFlags::Replied)" to "if (akonadiFlag == Akonadi::MessageFlags::Replied || akonadiFlag == Akonadi::MessageFlags::Answered)" for backward compatibility.
> 
> Christian Mollekopf wrote:
>     I don't really care which one we deprecate ;-) MessageFlags::Replied seems to have been introduced at a later stage, for whatever reason, and the IMAP resource only handles MessageFlags::Answered so I figured it's the other way round. In either case we'll have to deal with both flags when reading and switching to the non-deprecated when writing.
>     
>     The other option is a migration job, although I don't know how to ensure that they are being run.
> 
> Christian Mollekopf wrote:
>     $REPLIED seems indeed to be slightly more popular. Can we deprecate //Answered?
>     If yes we can drop this patch (the problem has been meanwhile fixed in the IMAP resource afaik).
> 
> Dan Vrátil wrote:
>     If $REPLIED is used more often in Akonadi, then let's deprecate \Answered.
>     
>     We can drop this review in any case, the problem has been indeed resolved in the IMAP resource (https://git.reviewboard.kde.org/r/112724/).
>     
>
> 
> Chuso Perez wrote:
>     I agree with Christian Mollekopf, I neither understand why there are two flags for the same state. I would remove $REPLIED since it is the non-standard one and the one that other applications don't recognize.
>     But please take into account that kdepim still needs to recognize $REPLIED in order to recognize message state properly for older messages using this flag.
> 
> Christian Mollekopf wrote:
>     It doesn't really matter which one we pick because the flag is purely akonadi internal. The IMAP Resource needs to translate the flag to the IMAP equivalent anyways so other applications will recognize the flag, that's fixed already (see above).
>     Assuming your problem is fixed by that, please close the review request.
>     
>     Thanks for the patch!

I disagree with Dan Vrátil.
Request #112724 has nothing to do with this one.
That one is about not setting flags that server won't understand.
This one is about using standard flags so other applications can recognize them.
That patch won't prevent KMail to set $REPLIED flag when server supports custom flags.
Here you have a real world case that patch won't solve (I checked it): http://en.chuso.net/kdepim-runtime-patch-standard-imap-flags-kmail-kde-bug-291332.html


- Chuso


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107179/#review37942
-----------------------------------------------------------


On Nov. 2, 2012, 4:55 p.m., Chuso Perez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107179/
> -----------------------------------------------------------
> 
> (Updated Nov. 2, 2012, 4:55 p.m.)
> 
> 
> Review request for KDEPIM.
> 
> 
> Description
> -------
> 
> (c&p) kmail2 uses it's own IMAP flags. Instead of RFC2060 compliant flags, like eg "\Answered", it uses "$REPLIED". That throws off other clients, e.g. Hastymail² webmailer which then cannot display the message status properly.
> 
> 
> This addresses bug 291332.
>     http://bugs.kde.org/show_bug.cgi?id=291332
> 
> 
> Diffs
> -----
> 
>   agents/maildispatcher/sentactionhandler.cpp 59dee37 
>   resources/maildir/libmaildir/maildir.cpp b6bb579 
> 
> Diff: http://git.reviewboard.kde.org/r/107179/diff/
> 
> 
> Testing
> -------
> 
> I've tested it for several months and it seems that fixes the reported bug with my coworkers with apparently no side effects.
> 
> 
> Thanks,
> 
> Chuso Perez
> 
>

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list