Changeset 68cb93


Ignore:
Timestamp:
Apr 4, 2010, 1:08:23 PM (12 years ago)
Author:
rene <rene@…>
Branches:
multiEdit, ng_0.6, ng_0.8, ng_0.9
Children:
c05d83
Parents:
73a656
Message:

detect content-base header to recognize feeds

Location:
chrome/content/v_identity
Files:
2 edited

Legend:

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

    r73a656 r68cb93  
    9494        var currentHeadersCounter = [];
    9595       
    96         var vI_listId = false; var vI_received = false;
    97         // loop through the headers
     96        var vI_listId = false; var vI_received = false; var vI_content_base = false;
    9897        for (var header in currentHeaderData) {
    9998            var headerName = currentHeaderData[header].headerName.toLowerCase();
     99//          vI_notificationBar.dump("## vI_getHeader: found header: " + currentHeaderData[header].headerName + "\n");
    100100
    101101            // remember list-id header to prevent using Mailing-List addresses as sender
     
    113113            }
    114114           
     115            // remember content-base header to prevent using Blog/News-Feed addresses as sender
     116            if (!vI_content_base && headerName == "content-base") {
     117                hdr.setStringProperty("vI_content_base","found"); vI_content_base = true;
     118                vI_notificationBar.dump("## vI_getHeader: found header: content-base  ...stored to recognize blog/news-feed\n");
     119//              continue;
     120            }
     121
    115122            if (currentHeadersCounter[headerName]) currentHeadersCounter[headerName]++
    116123            else currentHeadersCounter[headerName] = 1
     
    230237        // add Received to recognizable headers to detect if mail was sent or received
    231238        header_list.push("Received")
     239
     240        // add Website to recognizable headers to detect Blog/News-Posts
     241        header_list.push("content-base")
    232242
    233243//      try {
  • chrome/content/v_identity/vI_smartIdentity.js

    r73a656 r68cb93  
    258258        vI_notificationBar.dump("## vI_smartIdentity: Reply()\n");
    259259
    260         if (hdr && !gMsgCompose.compFields.newsgroups) {
     260        if (hdr && !gMsgCompose.compFields.newsgroups && !hdr.getStringProperty("vI_content_base")) {
    261261        //  RFC 2821 (http://www.ietf.org/rfc/rfc2821.txt) says:
    262262        //  "4.4 Trace Information
Note: See TracChangeset for help on using the changeset viewer.