Changeset 3004 for trunk


Ignore:
Timestamp:
07/06/10 17:17:36 (14 years ago)
Author:
alexandrecorreia
Message:

Ticket #1116 - Melhorias para a implementacao  http://xmpp.org/rfcs/rfc3921, secao 8.3, happy path

Location:
trunk/jmessenger/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/jmessenger/js/AddUser.js

    r2996 r3004  
    1313                                var name                = jidTo.substring(0, jidTo.indexOf('@')); 
    1414 
    15                                 var _groups             = "Sem Grupos"; 
     15                                var _groups             = ""; 
    1616 
    1717                                if( TrophyIM.rosterObj) 
    1818                                { 
    19                                         _groups = "Geral"; 
    20                                          
    2119                                        for (var group in TrophyIM.rosterObj.groups) 
    2220                                        { 
     
    185183                        var infoUser    = null;          
    186184                        var img                 = document.createElement('img'); 
    187                         var _groups             = "Sem Grupos"; 
     185                        var _groups             = ""; 
    188186 
    189187                        if( TrophyIM.rosterObj) 
    190188                        { 
    191                                 _groups = ""; 
    192                                  
    193189                                for (var group in TrophyIM.rosterObj.groups) 
    194190                                { 
  • trunk/jmessenger/js/trophyim.js

    r2998 r3004  
    594594                                                group_array[group_array.length] = groups[g].firstChild.nodeValue; 
    595595                                } 
    596  
    597                                 /*if( getAttribute('jid') == 'teste9@im.pr.gov.br' || getAttribute('jid') == 'alexandrecorreia@im.pr.gov.br' ) 
    598                                 { 
    599                                         alert(  "JID : " + getAttribute('jid') + "\n" + 
    600                                                         "ASK : " + getAttribute('ask') + "\n" +  
    601                                                         "SUBSCRIPTION : " + getAttribute('subscription') ); 
    602                                 }*/ 
    603                                  
    604                                  
    605                                 if( getAttribute('ask') && getAttribute('ask').toString() === "subscribe" ) 
     596                                 
     597                                if( getAttribute('ask') && getAttribute('ask').toString() === "subscribe" )  
    606598                                { 
    607599                                        if( getAttribute('subscription').toString() === "none" ) 
     
    617609                                else 
    618610                                { 
    619                                         if( getAttribute('subscription').toString() === "remove" ) 
     611                                        if( ( getAttribute('ask') == null && getAttribute('subscription').toString() === "remove" ) || getAttribute('subscription').toString() === "remove" ) 
    620612                                        { 
    621613                                                TrophyIM.rosterObj.removeContact( getAttribute('jid').toString() ); 
     
    18961888        var jid_lower   = barejid.toLowerCase(); 
    18971889         
    1898         /** 
    1899          * COMENTADO PARA TESTES 
    1900          *  
    1901         if( show != 'unavailable' && show != 'error' ) 
    1902         if( show != 'unavailable' ) 
    1903                 { 
    1904         */ 
     1890        if( show != 'unavailable' || show != 'error' ) 
     1891                { 
    19051892            if (!this.roster[jid_lower]) 
    19061893                        { 
    1907                 this.addContact(barejid, 'not-in-roster'); 
     1894                this.addContact( barejid, 'not-in-roster' ); 
    19081895            } 
    19091896             
     
    19221909             
    19231910            this.roster[jid_lower]['presence'][resource] = presence;     
    1924  
    1925        /**       
    1926          * COMENTADO PARA TESTES 
    1927          * 
    1928         } 
    1929         else  
    1930                 { 
    1931                 delete this.roster[jid_lower]; 
    1932         } 
    1933          
    1934                 this.addChange(jid_lower); 
    1935                 */ 
     1911                } 
    19361912    } 
    19371913 
Note: See TracChangeset for help on using the changeset viewer.