mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #7043
This commit is contained in:
@@ -13,10 +13,10 @@ module.exports = function (Groups) {
|
|||||||
}
|
}
|
||||||
query = query.toLowerCase();
|
query = query.toLowerCase();
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
async.apply(db.getObjectValues, 'groupslug:groupname'),
|
async.apply(db.getSortedSetRange, 'groups:createtime', 0, -1),
|
||||||
function (groupNames, next) {
|
function (groupNames, next) {
|
||||||
// Ephemeral groups and the registered-users groups are searchable
|
// 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) {
|
groupNames = groupNames.filter(function (name) {
|
||||||
return name.toLowerCase().includes(query) && name !== 'administrators' && !Groups.isPrivilegeGroup(name);
|
return name.toLowerCase().includes(query) && name !== 'administrators' && !Groups.isPrivilegeGroup(name);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user