Skip to content

Node.js based forum software built for the modern web

closes #6938

Barış Soner Uşaklı18219bd5f350
diff --git a/src/groups/posts.js b/src/groups/posts.js
index 425a9228e9..c38ed43c8e 100644
--- a/src/groups/posts.js
+++ b/src/groups/posts.js
@@ -20,10 +20,7 @@ module.exports = function (Groups) {
function (_groupNames, next) {
groupNames = _groupNames[0];
- var keys = groupNames.map(function (groupName) {
- return 'group:' + groupName + ':member:pids';
- });
-
+ const keys = groupNames.map(groupName => 'group:' + groupName + ':member:pids');
db.sortedSetsAdd(keys, postData.timestamp, postData.pid, next);
},
function (next) {
diff --git a/src/groups/update.js b/src/groups/update.js
index 6020f93b44..c389590f5d 100644
--- a/src/groups/update.js
+++ b/src/groups/update.js
@@ -232,6 +232,7 @@ module.exports = function (Groups) {
async.apply(db.rename, 'group:' + oldName + ':owners', 'group:' + newName + ':owners'),
async.apply(db.rename, 'group:' + oldName + ':pending', 'group:' + newName + ':pending'),
async.apply(db.rename, 'group:' + oldName + ':invited', 'group:' + newName + ':invited'),
+ async.apply(db.rename, 'group:' + oldName + ':member:pids', 'group:' + newName + ':member:pids'),
async.apply(renameGroupMember, 'groups:createtime', oldName, newName),
async.apply(renameGroupMember, 'groups:visible:createtime', oldName, newName),