mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
refactor: remove unused uids
This commit is contained in:
@@ -48,7 +48,7 @@ async function postTids(tids) {
|
|||||||
await Promise.all([].concat(
|
await Promise.all([].concat(
|
||||||
sendNotifications(uids, topicsData),
|
sendNotifications(uids, topicsData),
|
||||||
updateUserLastposttimes(uids, topicsData),
|
updateUserLastposttimes(uids, topicsData),
|
||||||
updateGroupPosts(uids, topicsData),
|
updateGroupPosts(topicsData),
|
||||||
...topicsData.map(topicData => unpin(topicData.tid, topicData)),
|
...topicsData.map(topicData => unpin(topicData.tid, topicData)),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@@ -151,7 +151,7 @@ async function updateUserLastposttimes(uids, topicsData) {
|
|||||||
return Promise.all(uidsToUpdate.map(uid => user.setUserField(uid, 'lastposttime', tstampByUid[uid])));
|
return Promise.all(uidsToUpdate.map(uid => user.setUserField(uid, 'lastposttime', tstampByUid[uid])));
|
||||||
}
|
}
|
||||||
|
|
||||||
async function updateGroupPosts(uids, topicsData) {
|
async function updateGroupPosts(topicsData) {
|
||||||
const postsData = await posts.getPostsData(topicsData.map(t => t && t.mainPid));
|
const postsData = await posts.getPostsData(topicsData.map(t => t && t.mainPid));
|
||||||
await Promise.all(postsData.map(async (post, i) => {
|
await Promise.all(postsData.map(async (post, i) => {
|
||||||
if (post && topicsData[i]) {
|
if (post && topicsData[i]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user