Skip to content

Node.js based forum software built for the modern web

fix: #7043

Barış Soner Uşaklı8d7c3897f289
diff --git a/src/groups/search.js b/src/groups/search.js
index 14b20a084f..6f8e6c82d5 100644
--- a/src/groups/search.js
+++ b/src/groups/search.js
@@ -13,10 +13,10 @@ module.exports = function (Groups) {
}
query = query.toLowerCase();
async.waterfall([
- async.apply(db.getObjectValues, 'groupslug:groupname'),
+ async.apply(db.getSortedSetRange, 'groups:createtime', 0, -1),
function (groupNames, next) {
// Ephemeral groups and the registered-users groups are searchable
- groupNames = Groups.ephemeralGroups.concat(groupNames).concat('registered-users');
+ groupNames = Groups.ephemeralGroups.concat(groupNames);
groupNames = groupNames.filter(function (name) {
return name.toLowerCase().includes(query) && name !== 'administrators' && !Groups.isPrivilegeGroup(name);
});