@@ -486,7 +486,7 @@ converse.plugins.add('converse-muc', {
486
486
const storage = _converse . config . get ( 'storage' ) ;
487
487
const id = `converse.muc-features-${ _converse . bare_jid } -${ this . get ( 'jid' ) } ` ;
488
488
this . features = new Backbone . Model (
489
- _ . assign ( { id} , _ . zipObject ( converse . ROOM_FEATURES , _ . map ( converse . ROOM_FEATURES , _ . stubFalse ) ) )
489
+ _ . assign ( { id} , _ . zipObject ( converse . ROOM_FEATURES , converse . ROOM_FEATURES . map ( _ . stubFalse ) ) )
490
490
) ;
491
491
this . features . browserStorage = new BrowserStorage . session ( id ) ;
492
492
} ,
@@ -848,7 +848,7 @@ converse.plugins.add('converse-muc', {
848
848
849
849
const features = await _converse . api . disco . getFeatures ( this . get ( 'jid' ) ) ;
850
850
const attrs = Object . assign (
851
- _ . zipObject ( converse . ROOM_FEATURES , _ . map ( converse . ROOM_FEATURES , _ . stubFalse ) ) ,
851
+ _ . zipObject ( converse . ROOM_FEATURES , converse . ROOM_FEATURES . map ( _ . stubFalse ) ) ,
852
852
{ 'fetched' : ( new Date ( ) ) . toISOString ( ) }
853
853
) ;
854
854
features . each ( feature => {
@@ -900,8 +900,8 @@ converse.plugins.add('converse-muc', {
900
900
* has return a response IQ.
901
901
*/
902
902
saveConfiguration ( form ) {
903
- const inputs = form ? sizzle ( ':input:not([type=button]):not([type=submit])' , form ) : [ ] ,
904
- configArray = _ . map ( inputs , u . webForm2xForm ) ;
903
+ const inputs = form ? sizzle ( ':input:not([type=button]):not([type=submit])' , form ) : [ ] ;
904
+ const configArray = inputs . map ( u . webForm2xForm ) ;
905
905
return this . sendConfiguration ( configArray ) ;
906
906
} ,
907
907
@@ -1283,7 +1283,7 @@ converse.plugins.add('converse-muc', {
1283
1283
}
1284
1284
const occupant = this . occupants . findOccupant ( data ) ;
1285
1285
if ( data . type === 'unavailable' && occupant ) {
1286
- if ( ! _ . includes ( data . states , converse . MUC_NICK_CHANGED_CODE ) && ! occupant . isMember ( ) ) {
1286
+ if ( ! data . states . includes ( converse . MUC_NICK_CHANGED_CODE ) && ! occupant . isMember ( ) ) {
1287
1287
// We only destroy the occupant if this is not a nickname change operation.
1288
1288
// and if they're not on the member lists.
1289
1289
// Before destroying we set the new data, so
@@ -1575,7 +1575,7 @@ converse.plugins.add('converse-muc', {
1575
1575
} ,
1576
1576
1577
1577
handleDisconnection ( stanza ) {
1578
- const is_self = ! _ . isNull ( stanza . querySelector ( "status[code='110']" ) ) ;
1578
+ const is_self = stanza . querySelector ( "status[code='110']" ) !== null ;
1579
1579
const x = sizzle ( `x[xmlns="${ Strophe . NS . MUC_USER } "]` , stanza ) . pop ( ) ;
1580
1580
if ( ! x ) {
1581
1581
return ;
@@ -1831,7 +1831,7 @@ converse.plugins.add('converse-muc', {
1831
1831
const nick = this . get ( 'nick' ) ;
1832
1832
if ( message . get ( 'references' ) . length ) {
1833
1833
const mentions = message . get ( 'references' ) . filter ( ref => ( ref . type === 'mention' ) ) . map ( ref => ref . value ) ;
1834
- return _ . includes ( mentions , nick ) ;
1834
+ return mentions . includes ( nick ) ;
1835
1835
} else {
1836
1836
return ( new RegExp ( `\\b${ nick } \\b` ) ) . test ( message . get ( 'message' ) ) ;
1837
1837
}
@@ -1894,7 +1894,7 @@ converse.plugins.add('converse-muc', {
1894
1894
}
1895
1895
vcards . push ( _converse . vcards . findWhere ( { 'jid' : this . get ( 'from' ) } ) ) ;
1896
1896
1897
- _ . forEach ( _ . filter ( vcards , undefined ) , ( vcard ) => {
1897
+ vcards . filter ( v => v ) . forEach ( vcard => {
1898
1898
if ( hash && vcard . get ( 'image_hash' ) !== hash ) {
1899
1899
_converse . api . vcard . update ( vcard , true ) ;
1900
1900
}
@@ -2175,7 +2175,7 @@ converse.plugins.add('converse-muc', {
2175
2175
} else if ( _ . isString ( jids ) ) {
2176
2176
return createChatRoom ( jids , attrs ) ;
2177
2177
}
2178
- return _ . map ( jids , _ . partial ( createChatRoom , _ , attrs ) ) ;
2178
+ return jids . map ( jid => createChatRoom ( jid , attrs ) ) ;
2179
2179
} ,
2180
2180
2181
2181
/**
@@ -2249,7 +2249,7 @@ converse.plugins.add('converse-muc', {
2249
2249
}
2250
2250
return room ;
2251
2251
} else {
2252
- return _ . map ( jids , jid => _converse . api . rooms . create ( jid , attrs ) . maybeShow ( force ) ) ;
2252
+ return jids . map ( jid => _converse . api . rooms . create ( jid , attrs ) . maybeShow ( force ) ) ;
2253
2253
}
2254
2254
} ,
2255
2255
@@ -2297,7 +2297,7 @@ converse.plugins.add('converse-muc', {
2297
2297
if ( _ . isString ( jids ) ) {
2298
2298
return getChatRoom ( jids , attrs ) ;
2299
2299
}
2300
- return _ . map ( jids , _ . partial ( getChatRoom , _ , attrs ) ) ;
2300
+ return jids . map ( jid => getChatRoom ( jid , attrs ) ) ;
2301
2301
}
2302
2302
}
2303
2303
} ) ;
0 commit comments