Changeset afd8b0


Ignore:
Timestamp:
Oct 8, 2011, 7:46:28 PM (9 years ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
c272bf
Parents:
41266a
Message:

updated conversation plugin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chrome/content/v_identity/modules/plugins/conversation.js

    r41266a rafd8b0  
    2222let _rdfDatasourceAccess;
    2323
    24 function changeIdentityToSmartIdentity(allIdentities, index) {
     24let changeIdentityToSmartIdentity = function(allIdentities, index) {
    2525  _changeIdentityToSmartIdentity(allIdentities.identityDataCollection[index]);
    26 }
     26};
    2727
    28 function _changeIdentityToSmartIdentity(identityData) {
     28let _changeIdentityToSmartIdentity = function(identityData) {
    2929  Log.debug("## changeIdentityToSmartIdentity\n");
    3030  // add code to set stored base identity
     
    4141  }
    4242  virtualSenderNameElem.text(identityData.combinedName); // change this also to reflect changes of base id
    43 }
     43};
    4444
    4545let conversationHook = {
    46   onComposeSessionConstructDone: function (params, match, senderNameElem, ExternalLog) {
     46  onComposeSessionConstructDone: function (recipientString, params, senderNameElem, ExternalLog) {
    4747    // this.params = { identity: ???, msgHdr: ???, subject: ??? };
    4848    Log = ExternalLog;
     
    5151    virtualIdentityData = null; virtualIdInUse = false; virtualIdSenderName = "";
    5252   
    53    
    54     let recipientString = params.msgHdr.mime2DecodedRecipients;
    55     if (params.identity.doCc) recipientString += "," + params.identity.doCcList;
    56     recipientString += "," + params.msgHdr.ccList;
    57    
    5853    let recipients = []; var combinedNames = {}; var number;
    5954    number = HeaderParser.parseHeadersWithArray(recipientString, {}, {}, combinedNames);
    6055    for (var index = 0; index < number; index++)
    6156      recipients.push( { recipient: combinedNames.value[index], recipientType: "addr_to" } )
    62  
    63 /*    match({
    64       reply: function (aMessage, aReplyType) {
    65         if (aReplyType == "replyAll") { // if we reply to all then take care of all the recipients
    66 
    67           Log.debug("replyAll - adding cc recipients too");
    68           number = HeaderParser.parseHeadersWithArray(params.msgHdr.ccList, {}, {}, combinedNames);
    69           for (var index = 0; index < number; index++)
    70             recipients.push( { recipient: combinedNames.value[index], recipientType: "addr_to" } )
    71         }
    72       },
    73       draft: function ({ msgUri }) { Log.debug("match draft - currently not used", msgUri); }
    74     });*/
    7557     
    7658    var localSmartIdentityCollection = new vI.smartIdentityCollection(params.msgHdr, params.identity, false, false, recipients);
     
    8264      var existingIDIndex = localSmartIdentityCollection._foundExistingIdentity();
    8365      if (existingIDIndex) {
    84         Log.debug("## smartIdentity: found existing Identity, use without interaction.\n");
    85         changeIdentityToSmartIdentity(localSmartIdentityCollection._allIdentities, existingIDIndex);
     66        Log.debug("## smartIdentity: found existing Identity, use without interaction.\n", existingIDIndex.key);
     67        changeIdentityToSmartIdentity(localSmartIdentityCollection._allIdentities, existingIDIndex.key);
    8668        return;
    8769      }
Note: See TracChangeset for help on using the changeset viewer.