Skip to content

Commit 6cb1f93

Browse files
ilmartyrkDiverVM
andauthored
5.1.8 (#477)
* filter out draft activities (#476) Co-authored-by: Viktar Maslouski <[email protected]> * chore: Update CHANGELOG.md * chore: update .gitignore * 5.1.8 --------- Co-authored-by: Viktar Maslouski <[email protected]>
1 parent 8d91f16 commit 6cb1f93

File tree

6 files changed

+20
-4
lines changed

6 files changed

+20
-4
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,10 @@ Thumbs.db
1717
/public/uploads
1818
/test/tmp/**
1919
!/test/tmp/README.md
20+
21+
# Development and IDE files
22+
.env
23+
.cursorrules
24+
.vscode/
25+
actions-runner/
26+
test/api/uploads/

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 2025-06-18 - v5.1.8
2+
* Fix: Issue FE #2139: filter out draft activities
3+
14
## 2025-05-08 - v5.1.7
25
* Fix: Issue #469: BUG: Vote reminder crashing the app
36

eslint.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import pluginJs from "@eslint/js";
33
import mochaPlugin from 'eslint-plugin-mocha';
44

55
export default [
6+
{ ignores: ["actions-runner/", "test/api/uploads/", "test/api/uploads/**"] },
67
{ files: ["**/*.js"], languageOptions: { sourceType: "commonjs" } },
78
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
89
pluginJs.configs.recommended,

npm-shrinkwrap.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "citizenos-api",
3-
"version": "5.1.7",
3+
"version": "5.1.8",
44
"private": false,
55
"license": "Apache-2.0",
66
"main": "./bin/www",

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)