Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
dd505ad9
Commit
dd505ad9
authored
May 01, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More fixes now that we don't store the JID under 'fullname'
if the fullname is not available.
parent
cbc48629
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
src/converse-core.js
src/converse-core.js
+4
-4
src/converse-rosterview.js
src/converse-rosterview.js
+10
-9
No files found.
src/converse-core.js
View file @
dd505ad9
...
...
@@ -1206,12 +1206,12 @@
this
.
sendContactAddIQ
(
jid
,
name
,
groups
,
()
=>
{
const
contact
=
this
.
create
(
_
.
assignIn
({
ask
:
undefined
,
fullname
:
name
,
'
ask
'
:
undefined
,
'
fullname
'
:
name
,
groups
,
jid
,
requesting
:
false
,
subscription
:
'
none
'
'
requesting
'
:
false
,
'
subscription
'
:
'
none
'
},
attributes
),
{
sort
:
false
});
resolve
(
contact
);
},
...
...
src/converse-rosterview.js
View file @
dd505ad9
...
...
@@ -186,7 +186,7 @@
xhr
.
onload
=
function
()
{
if
(
xhr
.
responseText
)
{
awesomplete
.
list
=
JSON
.
parse
(
xhr
.
responseText
).
map
((
i
)
=>
{
//eslint-disable-line arrow-body-style
return
{
'
label
'
:
i
.
fullname
,
'
value
'
:
i
.
jid
};
return
{
'
label
'
:
i
.
fullname
||
i
.
jid
,
'
value
'
:
i
.
jid
};
});
awesomplete
.
evaluate
();
}
...
...
@@ -416,7 +416,7 @@
this
.
el
.
classList
.
add
(
'
pending-xmpp-contact
'
);
this
.
el
.
innerHTML
=
tpl_pending_contact
(
_
.
extend
(
item
.
toJSON
(),
{
'
desc_remove
'
:
__
(
'
Click to remove %1$s as a contact
'
,
item
.
get
(
'
fullname
'
)),
'
desc_remove
'
:
__
(
'
Click to remove %1$s as a contact
'
,
item
.
get
(
'
fullname
'
)
||
item
.
get
(
'
jid
'
)
),
'
allow_chat_pending_contacts
'
:
_converse
.
allow_chat_pending_contacts
})
);
...
...
@@ -424,8 +424,8 @@
this
.
el
.
classList
.
add
(
'
requesting-xmpp-contact
'
);
this
.
el
.
innerHTML
=
tpl_requesting_contact
(
_
.
extend
(
item
.
toJSON
(),
{
'
desc_accept
'
:
__
(
"
Click to accept the contact request from %1$s
"
,
item
.
get
(
'
fullname
'
)),
'
desc_decline
'
:
__
(
"
Click to decline the contact request from %1$s
"
,
item
.
get
(
'
fullname
'
)),
'
desc_accept
'
:
__
(
"
Click to accept the contact request from %1$s
"
,
item
.
get
(
'
fullname
'
)
||
item
.
get
(
'
jid
'
)
),
'
desc_decline
'
:
__
(
"
Click to decline the contact request from %1$s
"
,
item
.
get
(
'
fullname
'
)
||
item
.
get
(
'
jid
'
)
),
'
allow_chat_pending_contacts
'
:
_converse
.
allow_chat_pending_contacts
})
);
...
...
@@ -454,8 +454,8 @@
_
.
extend
(
item
.
toJSON
(),
{
'
desc_status
'
:
STATUSES
[
chat_status
],
'
status_icon
'
:
status_icon
,
'
desc_chat
'
:
__
(
'
Click to chat with %1$s (JID: %2$s)
'
,
item
.
get
(
'
fullname
'
),
item
.
get
(
'
jid
'
)),
'
desc_remove
'
:
__
(
'
Click to remove %1$s as a contact
'
,
item
.
get
(
'
fullname
'
)),
'
desc_chat
'
:
__
(
'
Click to chat with %1$s (JID: %2$s)
'
,
item
.
get
(
'
fullname
'
)
||
item
.
get
(
'
jid
'
)
,
item
.
get
(
'
jid
'
)),
'
desc_remove
'
:
__
(
'
Click to remove %1$s as a contact
'
,
item
.
get
(
'
fullname
'
)
||
item
.
get
(
'
jid
'
)
),
'
allow_contact_removal
'
:
_converse
.
allow_contact_removal
,
'
num_unread
'
:
item
.
get
(
'
num_unread
'
)
||
0
})
...
...
@@ -633,9 +633,10 @@
);
}
}
else
{
matches
=
this
.
model
.
contacts
.
filter
(
u
.
contains
.
not
(
'
fullname
'
,
q
)
);
matches
=
this
.
model
.
contacts
.
filter
((
contact
)
=>
{
const
value
=
contact
.
get
(
'
fullname
'
)
||
contact
.
get
(
'
jid
'
);
return
_
.
includes
(
value
.
toLowerCase
(),
q
.
toLowerCase
());
});
}
return
matches
;
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment