зеркало из 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
|
mComposeObj->GetCompFields(&compFields); //GetCompFields will addref, you need to release when your are done with it
|
||||||
if (compFields)
|
if (compFields)
|
||||||
{
|
{
|
||||||
nsAutoString aCharset(msgCompHeaderInternalCharset());
|
nsAutoString aCharset(msgCompHeaderInternalCharset());
|
||||||
nsAutoString replyTo;
|
nsAutoString replyTo;
|
||||||
nsAutoString newgroups;
|
nsAutoString newgroups;
|
||||||
nsAutoString followUpTo;
|
nsAutoString followUpTo;
|
||||||
|
nsAutoString messageId;
|
||||||
|
nsAutoString references;
|
||||||
char *outCString = nsnull;
|
char *outCString = nsnull;
|
||||||
PRUnichar emptyUnichar = 0;
|
PRUnichar emptyUnichar = 0;
|
||||||
PRBool toChanged = PR_FALSE;
|
PRBool toChanged = PR_FALSE;
|
||||||
|
@ -1135,6 +1137,22 @@ NS_IMETHODIMP QuotingOutputStreamListener::OnStopRequest(nsIChannel * /* aChanne
|
||||||
PR_FREEIF(outCString);
|
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())
|
if (! replyTo.IsEmpty())
|
||||||
{
|
{
|
||||||
compFields->SetTo(replyTo.GetUnicode());
|
compFields->SetTo(replyTo.GetUnicode());
|
||||||
|
@ -1155,6 +1173,11 @@ NS_IMETHODIMP QuotingOutputStreamListener::OnStopRequest(nsIChannel * /* aChanne
|
||||||
compFields->SetTo(&emptyUnichar);
|
compFields->SetTo(&emptyUnichar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! references.IsEmpty())
|
||||||
|
references += ' ';
|
||||||
|
references += messageId;
|
||||||
|
compFields->SetReferences(references.GetUnicode());
|
||||||
|
|
||||||
if (toChanged)
|
if (toChanged)
|
||||||
{
|
{
|
||||||
//Remove duplicate addresses between TO && CC
|
//Remove duplicate addresses between TO && CC
|
||||||
|
|
Загрузка…
Ссылка в новой задаче