From mboxrd@z Thu Jan 1 00:00:00 1970 From: col@baibell.org (Colin Bell) Date: Fri, 02 Nov 2007 12:19:10 +1100 Subject: [sup-talk] [PATCH] Fix for imap based sources In-Reply-To: <1193962132-sup-5058@silver> References: <47206F23.6080400@quintic.co.uk> <1193962132-sup-5058@silver> Message-ID: <1193966225-sup-1066@lankhmar> Excerpts from Ian Taylor's message of Fri Nov 02 11:14:55 +1100 2007: > > That doesn't seem quite right to me. The RFC seems to state that the > 'Recent' flag is more of a notification that this is the first session > to see the message. > > What about this instead? > > labels = { :Flagged => :starred, > :Deleted => :deleted > }.inject(@labels) do |cur, (imap, sup)| > cur + (state[:flags].include?(imap) ? [sup] : []) > end > labels += [:unread] unless state[:flags].include?(:Seen) > > Seems like we want to tag it as unread if it isn't marked as 'Seen'. Works for me. Thanks