Skip to content

Commit 2afc727

Browse files
ilmartyrkDiverVM
andauthored
filter out draft activities (#472)
Co-authored-by: Viktar Maslouski <[email protected]>
1 parent 8d91f16 commit 2afc727

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

routes/api/activity.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,12 @@ module.exports = function (app) {
202202
* @todo Think of how to handle anonymous ideas.
203203
* @todo Think of how to move this to the SQL query.
204204
*/
205-
const activities = allActivities.filter((it) => it.data.actor.id !== null)
205+
let activities = allActivities.filter((it) => it.data.actor.id !== null)
206+
207+
/**
208+
* Filter out activities with draft status.
209+
*/
210+
activities = activities.filter((it) => it.data.object.status !== "draft")
206211

207212
const returnList = [];
208213
activities.forEach(function (activity) {

0 commit comments

Comments
 (0)