diff options
Diffstat (limited to 'mailnews/compose/src/nsMsgComposeService.cpp')
-rw-r--r-- | mailnews/compose/src/nsMsgComposeService.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mailnews/compose/src/nsMsgComposeService.cpp b/mailnews/compose/src/nsMsgComposeService.cpp index bec88f8fe3..dfd2d75b61 100644 --- a/mailnews/compose/src/nsMsgComposeService.cpp +++ b/mailnews/compose/src/nsMsgComposeService.cpp @@ -387,14 +387,22 @@ nsMsgComposeService::OpenComposeWindow(const char *msgComposeWindowURL, nsIMsgDB /* Actually, the only way to implement forward inline is to simulate a template message. Maybe one day when we will have more time we can change that */ - if (type == nsIMsgCompType::ForwardInline || type == nsIMsgCompType::Draft || type == nsIMsgCompType::Template - || type == nsIMsgCompType::ReplyWithTemplate || type == nsIMsgCompType::Redirect) + if (type == nsIMsgCompType::ForwardInline || type == nsIMsgCompType::Draft || + type == nsIMsgCompType::Template || + type == nsIMsgCompType::ReplyWithTemplate || + type == nsIMsgCompType::Redirect || + type == nsIMsgCompType::EditAsNew) { nsAutoCString uriToOpen(originalMsgURI); uriToOpen += (uriToOpen.FindChar('?') == kNotFound) ? '?' : '&'; uriToOpen.Append("fetchCompleteMessage=true"); + // The compose type that gets transmitted to a compose window open in mime + // is communicated using url query parameters here. + if (type == nsIMsgCompType::Redirect) uriToOpen.Append("&redirect=true"); + else if (type == nsIMsgCompType::EditAsNew) + uriToOpen.Append("&editasnew=true"); return LoadDraftOrTemplate(uriToOpen, type == nsIMsgCompType::ForwardInline || type == nsIMsgCompType::Draft ? nsMimeOutput::nsMimeMessageDraftOrTemplate : nsMimeOutput::nsMimeMessageEditorTemplate, |