File tree Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ export default BootstrapModal.extend({
32
32
placeholder = muc_domain ?
`name@${ muc_domain } ` :
__ ( '[email protected] ' ) ;
33
33
}
34
34
return tpl_add_muc ( Object . assign ( this . model . toJSON ( ) , {
35
- '_converse' : _converse ,
36
35
'label_room_address' : api . settings . get ( 'muc_domain' ) ? __ ( 'Groupchat name' ) : __ ( 'Groupchat address' ) ,
37
36
'chatroom_placeholder' : placeholder ,
38
37
'muc_roomid_policy_error_msg' : this . muc_roomid_policy_error_msg ,
Original file line number Diff line number Diff line change @@ -41,7 +41,13 @@ async function searchRooms (query) {
41
41
return [ ] ;
42
42
}
43
43
const s = `result[xmlns="${ Strophe . NS . MUCSEARCH } "] item` ;
44
- return sizzle ( s , iq_result ) . map ( i => `${ i . querySelector ( 'name' ) ?. textContent } (${ i . getAttribute ( 'address' ) } )` ) ;
44
+ return sizzle ( s , iq_result ) . map ( i => {
45
+ const jid = i . getAttribute ( 'address' ) ;
46
+ return {
47
+ 'label' : `${ i . querySelector ( 'name' ) ?. textContent } (${ jid } )` ,
48
+ 'value' : jid
49
+ }
50
+ } ) ;
45
51
}
46
52
47
53
export function getAutoCompleteList ( query ) {
@@ -50,4 +56,3 @@ export function getAutoCompleteList (query) {
50
56
}
51
57
return rooms_cache [ query ] ;
52
58
}
53
-
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ export default (o) => {
36
36
< label for ="chatroom "> ${ o . label_room_address } :</ label >
37
37
${ ( o . muc_roomid_policy_error_msg ) ? html `< label class ="roomid-policy-error "> ${ o . muc_roomid_policy_error_msg } </ label > ` : '' }
38
38
< converse-autocomplete
39
- .getAutoCompleteList =" ${ getAutoCompleteList } "
39
+ .getAutoCompleteList =${ getAutoCompleteList }
40
40
?autofocus =${ true }
41
41
min_chars="3"
42
42
position="below"
Original file line number Diff line number Diff line change @@ -59,7 +59,6 @@ export class AutoComplete {
59
59
}
60
60
61
61
bindEvents ( ) {
62
- // Bind events
63
62
const input = {
64
63
"blur" : ( ) => this . close ( { 'reason' : 'blur' } )
65
64
}
You can’t perform that action at this time.
0 commit comments