Changeset afd8b0
- Timestamp:
- Oct 8, 2011, 7:46:28 PM (9 years ago)
- Branches:
- ng_0.9
- Children:
- c272bf
- Parents:
- 41266a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chrome/content/v_identity/modules/plugins/conversation.js
r41266a rafd8b0 22 22 let _rdfDatasourceAccess; 23 23 24 function changeIdentityToSmartIdentity(allIdentities, index) {24 let changeIdentityToSmartIdentity = function(allIdentities, index) { 25 25 _changeIdentityToSmartIdentity(allIdentities.identityDataCollection[index]); 26 } 26 }; 27 27 28 function _changeIdentityToSmartIdentity(identityData) {28 let _changeIdentityToSmartIdentity = function(identityData) { 29 29 Log.debug("## changeIdentityToSmartIdentity\n"); 30 30 // add code to set stored base identity … … 41 41 } 42 42 virtualSenderNameElem.text(identityData.combinedName); // change this also to reflect changes of base id 43 } 43 }; 44 44 45 45 let conversationHook = { 46 onComposeSessionConstructDone: function ( params, match, senderNameElem, ExternalLog) {46 onComposeSessionConstructDone: function (recipientString, params, senderNameElem, ExternalLog) { 47 47 // this.params = { identity: ???, msgHdr: ???, subject: ??? }; 48 48 Log = ExternalLog; … … 51 51 virtualIdentityData = null; virtualIdInUse = false; virtualIdSenderName = ""; 52 52 53 54 let recipientString = params.msgHdr.mime2DecodedRecipients;55 if (params.identity.doCc) recipientString += "," + params.identity.doCcList;56 recipientString += "," + params.msgHdr.ccList;57 58 53 let recipients = []; var combinedNames = {}; var number; 59 54 number = HeaderParser.parseHeadersWithArray(recipientString, {}, {}, combinedNames); 60 55 for (var index = 0; index < number; index++) 61 56 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 recipients66 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 });*/75 57 76 58 var localSmartIdentityCollection = new vI.smartIdentityCollection(params.msgHdr, params.identity, false, false, recipients); … … 82 64 var existingIDIndex = localSmartIdentityCollection._foundExistingIdentity(); 83 65 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); 86 68 return; 87 69 }
Note: See TracChangeset
for help on using the changeset viewer.