From 354a9ad13f1ba85624ccb8790eb8dd31805c3d16 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sat, 7 Jul 2018 13:08:16 +0200 Subject: [PATCH] Also update the nodeinfo endpoint --- app.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 2a066de..05ce438 100644 --- a/app.py +++ b/app.py @@ -762,6 +762,11 @@ def note_by_id(note_id): @app.route("/nodeinfo") def nodeinfo(): + q = { + "box": Box.OUTBOX.value, + "meta.deleted": False, # TODO(tsileo): retrieve deleted and expose tombstone + 'type': {'$in': [ActivityType.CREATE.value, ActivityType.ANNOUNCE.value]}, + } return Response( headers={ "Content-Type": "application/json; profile=http://nodeinfo.diaspora.software/ns/schema/2.0#" @@ -778,7 +783,7 @@ def nodeinfo(): "openRegistrations": False, "usage": { "users": {"total": 1}, - "localPosts": DB.activities.count({"box": Box.OUTBOX.value}), + "localPosts": DB.activities.count(q), }, "metadata": { "sourceCode": "https://github.com/tsileo/microblog.pub",