mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 07:13:57 +02:00
suggest only unrestricted domains, and also use server to sort
This commit is contained in:
parent
abb63139f6
commit
17e64cf5e6
1 changed files with 4 additions and 3 deletions
|
@ -245,8 +245,10 @@ Window {
|
|||
if (!options.page) {
|
||||
options.page = 1;
|
||||
}
|
||||
// FIXME: really want places I'm allowed in, not just open ones
|
||||
var url = "https://metaverse.highfidelity.com/api/v1/domains/all?open&active&page=" + options.page + "&users=" + options.minUsers + "-" + options.maxUsers;
|
||||
// FIXME: really want places I'm allowed in, not just open ones.
|
||||
// FIXME: If logged in, add hifi to the restriction options, in order to include places that require login.
|
||||
// FIXME: add maturity
|
||||
var url = "https://metaverse.highfidelity.com/api/v1/domains/all?open&active&restriction=open&sort_by=users&sort_order=desc&page=" + options.page + "&users=" + options.minUsers + "-" + options.maxUsers;
|
||||
getRequest(url, function (error, json) {
|
||||
if (!error && (json.status !== 'success')) {
|
||||
error = new Error("Bad response: " + JSON.stringify(json));
|
||||
|
@ -304,7 +306,6 @@ Window {
|
|||
}
|
||||
var here = AddressManager.hostname; // don't show where we are now.
|
||||
allDomains = domains.filter(function (domain) { return domain.name !== here; });
|
||||
allDomains.sort(function (a, b) { return b.online_users - a.online_users; });
|
||||
// Whittle down suggestions to those that have at least one user, and try to get pictures.
|
||||
suggestionChoices = allDomains.filter(function (domain) { return domain.online_users; });
|
||||
asyncEach(domains, addPictureToDomain, function (error) {
|
||||
|
|
Loading…
Reference in a new issue