fix filters firing on read message, r=mscott, 17838

git-svn-id: svn://10.0.0.236/trunk@53293 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bienvenu%netscape.com
1999-11-12 01:29:26 +00:00
parent 93f188b106
commit c43f45b36a

View File

@@ -1511,13 +1511,19 @@ NS_IMETHODIMP nsImapMailFolder::NormalEndHeaderParseStream(nsIImapProtocol*
// If this is the inbox, try to apply filters.
if (mFlags & MSG_FOLDER_FLAG_INBOX)
{
rv = m_msgParser->GetAllHeaders(&headers, &headersSize);
PRUint32 msgFlags;
if (NS_SUCCEEDED(rv) && headers)
newMsgHdr->GetFlags(&msgFlags);
if (!(msgFlags & MSG_FLAG_READ)) // only fire on unread msgs
{
if (m_filterList)
m_filterList->ApplyFiltersToHdr(nsMsgFilterType::InboxRule, newMsgHdr, this, mDatabase,
headers, headersSize, this);
rv = m_msgParser->GetAllHeaders(&headers, &headersSize);
if (NS_SUCCEEDED(rv) && headers)
{
if (m_filterList)
m_filterList->ApplyFiltersToHdr(nsMsgFilterType::InboxRule, newMsgHdr, this, mDatabase,
headers, headersSize, this);
}
}
}
// here we need to tweak flags from uid state..