Skip to content
Snippets Groups Projects
Commit 7b02134f authored by Jean-Baptiste Pasquier's avatar Jean-Baptiste Pasquier
Browse files

Merge branch 'beta' of git.startinblox.com:components/solid-xmpp-chat into beta

parents 83b543b6 bf1e5b48
No related branches found
Tags v1.0.22
No related merge requests found
Pipeline #19296 passed with stage
in 51 seconds
...@@ -5,11 +5,13 @@ converse.plugins.add('sib-mention-autocomplete', { ...@@ -5,11 +5,13 @@ converse.plugins.add('sib-mention-autocomplete', {
overrides: { overrides: {
ChatRoom: { ChatRoom: {
/** /**
* Get all known nicknames from the occupants of the room.
* Move the `all` mention at the bottom. * Move the `all` mention at the bottom.
*
* @returns {*} * @returns {*}
*/ */
getAllKnownNicknames() { getAllKnownNicknames() {
const nicknames = this.__super__.getAllKnownNicknames.apply(this, arguments); const nicknames = [...new Set(this.occupants.map(o => o.get('nick')).filter(n => n))];
if (nicknames.indexOf('all') >= 0) { if (nicknames.indexOf('all') >= 0) {
return nicknames.filter(n => n !== 'all').concat(['all']); return nicknames.filter(n => n !== 'all').concat(['all']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment