@@ -195,9 +195,9 @@ define(['jquery', 'underscore', 'text!partials/chat.html', 'text!partials/chatro
195195 var options = $ . extend ( { } , opts ) ;
196196 var subscope = controller . rooms [ id ] ;
197197 var index = controller . visibleRooms . length ;
198- var buddy = buddyData . lookup ( id ) ;
199198 if ( ! subscope ) {
200199 console . log ( "Create new chatroom" , [ id ] ) ;
200+ var buddy = buddyData . lookup ( id ) ;
201201 if ( settings . group ) {
202202 controller . visibleRooms . unshift ( id ) ;
203203 } else {
@@ -217,9 +217,9 @@ define(['jquery', 'underscore', 'text!partials/chat.html', 'text!partials/chatro
217217 subscope . p2pstate = false ;
218218 subscope . active = false ;
219219 subscope . pending = 0 ;
220- subscope . isuser = ! ! ( buddy && buddy . session && buddy . session . Userid ) ;
221- subscope . iscontact = ! ! ( buddy && buddy . contact ) ;
222- subscope . canAddContact = ! subscope . isgroupchat && subscope . isuser ;
220+ subscope . isUser = ! ! ( buddy && buddy . session && buddy . session . Userid ) ;
221+ subscope . isContact = ! ! ( buddy && buddy . contact ) ;
222+ subscope . canAddContact = ! subscope . isgroupchat && subscope . isUser ;
223223 if ( ! subscope . isgroupchat ) {
224224 buddyData . push ( id ) ;
225225 }
@@ -345,7 +345,7 @@ define(['jquery', 'underscore', 'text!partials/chat.html', 'text!partials/chatro
345345 contacts . remove ( buddy . contact . Userid ) ;
346346 } ;
347347 subscope . updateContactStatus = function ( event , data ) {
348- subscope . iscontact = event . type === "contactadded" ;
348+ subscope . isContact = event . type === "contactadded" ;
349349 } ;
350350 contacts . e . on ( "contactadded" , subscope . updateContactStatus ) ;
351351 contacts . e . on ( "contactremoved" , subscope . updateContactStatus ) ;
0 commit comments