try to retain label when copying messages to imap server that doesn't support user defined keywords, 215777, sr=mscott

This commit is contained in:
bienvenu%nventure.com 2004-05-20 23:22:52 +00:00
Родитель ae0a110786
Коммит c2bf27ca90
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -6482,6 +6482,7 @@ nsImapMailFolder::CopyMessages(nsIMsgFolder* srcFolder,
nsCOMPtr <nsIMsgDBHdr> msgDBHdr = do_QueryElementAt(messages, i, &rv);
if (mDatabase && msgDBHdr)
{
nsMsgLabelValue label;
nsXPIDLCString junkScore, junkScoreOrigin;
msgDBHdr->GetStringProperty("junkscore", getter_Copies(junkScore));
msgDBHdr->GetStringProperty("junkscoreorigin", getter_Copies(junkScoreOrigin));
@ -6489,6 +6490,13 @@ nsImapMailFolder::CopyMessages(nsIMsgFolder* srcFolder,
mDatabase->SetAttributesOnPendingHdr(msgDBHdr, "junkscore", junkScore.get(), 0);
if (!junkScoreOrigin.IsEmpty())
mDatabase->SetAttributesOnPendingHdr(msgDBHdr, "junkscoreorigin", junkScore.get(), 0);
msgDBHdr->GetLabel(&label);
if (label != 0)
{
nsCAutoString labelStr;
labelStr.AppendInt(label);
mDatabase->SetAttributesOnPendingHdr(msgDBHdr, "label", labelStr.get(), 0);
}
}
}
}