Fix for 138054. When appending msg to a folder set the msg with "MDNSent" flag if we support the flag. r/sr=sspitzer.
This commit is contained in:
Родитель
6180a9328b
Коммит
7e3abbe47f
|
@ -4031,6 +4031,8 @@ nsresult nsImapMailFolder::NotifyMessageFlagsFromHdr(nsIMsgDBHdr *dbHdr, nsMsgKe
|
|||
// make some people very unhappy.
|
||||
if (flags & kImapMsgLabelFlags)
|
||||
mDatabase->SetLabel(msgKey, (flags & kImapMsgLabelFlags) >> 9);
|
||||
if (flags & kImapMsgMDNSentFlag)
|
||||
mDatabase->MarkMDNSent(msgKey, PR_TRUE, nsnull);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -5076,6 +5076,19 @@ void nsImapProtocol::OnAppendMsgFromFile()
|
|||
}
|
||||
}
|
||||
|
||||
void nsImapProtocol::CheckAndSetMDNSentFlag(nsImapAction imapAction, nsMsgKey key)
|
||||
{
|
||||
// If we're appending msg to folder and we support
|
||||
// MDNSent flag then flag the msg with "MDNSent".
|
||||
if ((imapAction == nsIImapUrl::nsImapAppendMsgFromFile) &&
|
||||
(GetServerStateParser().SupportsUserFlags() & kImapMsgSupportMDNSentFlag))
|
||||
{
|
||||
nsCAutoString newMsgId;
|
||||
newMsgId.AppendInt(key);
|
||||
Store(newMsgId.get(), "+FLAGS ($MDNSent)", PR_TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
void nsImapProtocol::UploadMessageFromFile (nsIFileSpec* fileSpec,
|
||||
const char* mailboxName,
|
||||
imapMessageFlagsType flags)
|
||||
|
@ -5156,6 +5169,8 @@ void nsImapProtocol::UploadMessageFromFile (nsIFileSpec* fileSpec,
|
|||
{
|
||||
nsMsgKey newKey =
|
||||
GetServerStateParser().CurrentResponseUID();
|
||||
// See if we have to mark "MDN sent" flag on the msg.
|
||||
CheckAndSetMDNSentFlag(imapAction, newKey);
|
||||
if (m_imapExtensionSink)
|
||||
{
|
||||
m_imapExtensionSink->SetAppendMsgUid(this, newKey,
|
||||
|
@ -5214,6 +5229,8 @@ void nsImapProtocol::UploadMessageFromFile (nsIFileSpec* fileSpec,
|
|||
delete searchResult;
|
||||
if (newkey != nsMsgKey_None)
|
||||
{
|
||||
// See if we have to mark "MDN sent" flag on the msg.
|
||||
CheckAndSetMDNSentFlag(imapAction, newkey);
|
||||
m_imapExtensionSink->SetAppendMsgUid
|
||||
(this, newkey, m_runningUrl);
|
||||
WaitForFEEventCompletion();
|
||||
|
|
|
@ -470,6 +470,7 @@ private:
|
|||
void WaitForPotentialListOfMsgsToFetch(PRUint32 **msgIdList, PRUint32 &msgCount);
|
||||
void WaitForPotentialListOfBodysToFetch(PRUint32 **msgIdList, PRUint32 &msgCount);
|
||||
void HeaderFetchCompleted();
|
||||
void CheckAndSetMDNSentFlag(nsImapAction imapAction, nsMsgKey key);
|
||||
void UploadMessageFromFile(nsIFileSpec* fileSpec, const char* mailboxName,
|
||||
imapMessageFlagsType flags);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче