Changeset 690854


Ignore:
Timestamp:
Sep 11, 2009, 3:53:05 PM (11 years ago)
Author:
rene <rene@…>
Branches:
master
Children:
7757aa
Parents:
18098a
Message:

backport of different 0.6-branch bugfixes

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • chrome/content/v_identity/vI_prefDialog_FolderPicker.js

    r18098a r690854  
    6464    var fccElement = document.getElementById("VIdent_identity.fccFolder")
    6565    var fccElementValue = fccElement.getAttribute("value");
    66     if (!fccElementValue) fccElement.setAttribute("value", rootFolder.server.serverURI + gFccFolderWithDelim)
     66    if (!fccElementValue || !GetMsgFolderFromUri(fccElementValue, false))
     67        fccElement.setAttribute("value", rootFolder.server.serverURI + gFccFolderWithDelim)
    6768
    6869    var draftElement = document.getElementById("VIdent_identity.draftFolder")
    6970    var draftElementValue = draftElement.getAttribute("value");
    70     if (!draftElementValue) draftElement.setAttribute("value", rootFolder.server.serverURI + gDraftsFolderWithDelim)
     71    if (!draftElementValue || !GetMsgFolderFromUri(draftElementValue, false))
     72        draftElement.setAttribute("value", rootFolder.server.serverURI + gDraftsFolderWithDelim)
    7173
    7274    var stationeryElement = document.getElementById("VIdent_identity.stationeryFolder")
    7375    var stationeryElementValue = stationeryElement.getAttribute("value");
    74     if (!stationeryElementValue) stationeryElement.setAttribute("value", rootFolder.server.serverURI + gTemplatesFolderWithDelim)
     76    if (!stationeryElementValue || !GetMsgFolderFromUri(stationeryElementValue, false))
     77        stationeryElement.setAttribute("value", rootFolder.server.serverURI + gTemplatesFolderWithDelim)
    7578}
    7679
  • chrome/content/v_identity/vI_smartIdentity.js

    r18098a r690854  
    265265        vI_notificationBar.dump("## vI_smartIdentity: Reply()\n");
    266266       
    267         if (hdr && !gMsgCompose.compFields.newsgroups && !hdr.getStringProperty("vI_received")) { // mail was not received
    268                 vI_notificationBar.dump("## vI_smartIdentity: reply on non-received (sent?) mail. Using SmartDraft. \n");
    269                 vI_smartIdentity.ReplyOnSent(hdr);
    270                 return;
     267        if (hdr && !gMsgCompose.compFields.newsgroups) {
     268        //  RFC 2821 (http://www.ietf.org/rfc/rfc2821.txt) says:
     269        //  "4.4 Trace Information
     270        //  When an SMTP server receives a message for delivery or further
     271        //  processing, it MUST insert trace ("time stamp" or "Received")
     272        //  information at the beginning of the message content, as discussed in
     273        //  section 4.1.1.4."
     274        //  so it should be always possible to decide if Reply or Draft based on received headers
     275        //  hidden option smart_detectByReceivedHeader will act as a switch for not RFC-compliant servers
     276            // RFC-compliant
     277            if (vI.preferences.getBoolPref("smart_detectByReceivedHeader")) {
     278                if (!hdr.getStringProperty("vI_received")) { // mail was not received
     279                    vI_notificationBar.dump("## vI_smartIdentity: reply on non-received (sent?) mail. Using SmartDraft. \n");
     280                    vI_notificationBar.dump("## vI_smartIdentity: if it is an received mail see ticket https://www.absorb.it/virtual-id/ticket/131 \n");
     281                    vI_smartIdentity.ReplyOnSent(hdr);
     282                    return;
     283                }
     284            }
     285            // not RFC-compliant
     286            else {
     287                const MSG_FOLDER_FLAG_INBOX = 0x1000
     288                const MSG_FOLDER_FLAG_SENTMAIL = 0x0200;
     289
     290                if (hdr && (hdr.folder.flags & MSG_FOLDER_FLAG_SENTMAIL)) {
     291                    vI_notificationBar.dump("## vI_smartIdentity: reply from Sent folder.");
     292                    if (hdr.folder.flags & MSG_FOLDER_FLAG_INBOX)
     293                        vI_notificationBar.dump(" Folder is INBOX, assuming Reply-Case. \n");
     294                    else {
     295                        vI_notificationBar.dump(" Using SmartDraft. \n");
     296                        vI_smartIdentity.ReplyOnSent(hdr);
     297                        return;
     298                    }
     299                }
     300            }
    271301        }
    272302
  • defaults/preferences/preferences.js

    r18098a r690854  
    1919pref("extensions.virtualIdentity.smart_reply_ignoreFullName", false);
    2020pref("extensions.virtualIdentity.smart_reply_for_newsgroups", false);
     21pref("extensions.virtualIdentity.smart_detectByReceivedHeader", true);
    2122pref("extensions.virtualIdentity.autoTimestamp", false);
    2223pref("extensions.virtualIdentity.get_header_notification", true);
Note: See TracChangeset for help on using the changeset viewer.