зеркало из https://github.com/mozilla/gecko-dev.git
Fix for bug 22055. We need to extract the message ID and the reference of the original message in order to build the new reference. R=bienvenu
This commit is contained in:
Родитель
88bfb6256e
Коммит
63c6af03cc
|
@ -1103,10 +1103,12 @@ NS_IMETHODIMP QuotingOutputStreamListener::OnStopRequest(nsIChannel * /* aChanne
|
|||
mComposeObj->GetCompFields(&compFields); //GetCompFields will addref, you need to release when your are done with it
|
||||
if (compFields)
|
||||
{
|
||||
nsAutoString aCharset(msgCompHeaderInternalCharset());
|
||||
nsAutoString replyTo;
|
||||
nsAutoString aCharset(msgCompHeaderInternalCharset());
|
||||
nsAutoString replyTo;
|
||||
nsAutoString newgroups;
|
||||
nsAutoString followUpTo;
|
||||
nsAutoString messageId;
|
||||
nsAutoString references;
|
||||
char *outCString = nsnull;
|
||||
PRUnichar emptyUnichar = 0;
|
||||
PRBool toChanged = PR_FALSE;
|
||||
|
@ -1135,6 +1137,22 @@ NS_IMETHODIMP QuotingOutputStreamListener::OnStopRequest(nsIChannel * /* aChanne
|
|||
PR_FREEIF(outCString);
|
||||
}
|
||||
|
||||
mHeaders->ExtractHeader(HEADER_MESSAGE_ID, PR_FALSE, &outCString);
|
||||
if (outCString)
|
||||
{
|
||||
// Convert fields to UTF-8
|
||||
ConvertToUnicode(aCharset, outCString, messageId);
|
||||
PR_FREEIF(outCString);
|
||||
}
|
||||
|
||||
mHeaders->ExtractHeader(HEADER_REFERENCES, PR_FALSE, &outCString);
|
||||
if (outCString)
|
||||
{
|
||||
// Convert fields to UTF-8
|
||||
ConvertToUnicode(aCharset, outCString, references);
|
||||
PR_FREEIF(outCString);
|
||||
}
|
||||
|
||||
if (! replyTo.IsEmpty())
|
||||
{
|
||||
compFields->SetTo(replyTo.GetUnicode());
|
||||
|
@ -1155,6 +1173,11 @@ NS_IMETHODIMP QuotingOutputStreamListener::OnStopRequest(nsIChannel * /* aChanne
|
|||
compFields->SetTo(&emptyUnichar);
|
||||
}
|
||||
|
||||
if (! references.IsEmpty())
|
||||
references += ' ';
|
||||
references += messageId;
|
||||
compFields->SetReferences(references.GetUnicode());
|
||||
|
||||
if (toChanged)
|
||||
{
|
||||
//Remove duplicate addresses between TO && CC
|
||||
|
|
Загрузка…
Ссылка в новой задаче