mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 06:15:11 +00:00
Merge https://github.com/friendica/red into pending_merge
This commit is contained in:
commit
43d2703e92
1 changed files with 2 additions and 2 deletions
|
@ -13,9 +13,9 @@ function contact_search(term, callback, backend_url, type, extra_channels) {
|
|||
for(t in contact_search.cache[bt]) {
|
||||
if(lterm.indexOf(t) >= 0) { // A more broad search has been performed already, so use those results
|
||||
// Filter old results locally
|
||||
var matching = contact_search.cache[bt][t].filter(function (x) { return (x.name.toLowerCase().indexOf(lterm) >= 0 || x.nick.toLowerCase().indexOf(lterm) >= 0); });
|
||||
var matching = contact_search.cache[bt][t].filter(function (x) { return (x.name.toLowerCase().indexOf(lterm) >= 0 || (typeof x.nick !== 'undefined' && x.nick.toLowerCase().indexOf(lterm) >= 0)); }); // Need to check that nick exists because groups don't have one
|
||||
matching.unshift({taggable:false, text: term, replace: term});
|
||||
callback(matching);
|
||||
setTimeout(function() { callback(matching)} , 1); // Use "pseudo-thread" to avoid some problems
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue