Filter the outbox when not authenticated
This commit is contained in:
7
app.py
7
app.py
@@ -886,12 +886,11 @@ def outbox():
|
|||||||
if request.method == "GET":
|
if request.method == "GET":
|
||||||
if not is_api_request():
|
if not is_api_request():
|
||||||
abort(404)
|
abort(404)
|
||||||
# TODO(tsileo): filter the outbox if not authenticated
|
# TODO(tsileo): returns the whole outbox if authenticated
|
||||||
# FIXME(tsileo): filter deleted, add query support for build_ordered_collection
|
|
||||||
q = {
|
q = {
|
||||||
"box": Box.OUTBOX.value,
|
"box": Box.OUTBOX.value,
|
||||||
"meta.deleted": False,
|
"meta.deleted": False, # TODO(tsileo): retrieve deleted and expose tombstone
|
||||||
# 'type': {'$in': [ActivityType.CREATE.value, ActivityType.ANNOUNCE.value]},
|
'type': {'$in': [ActivityType.CREATE.value, ActivityType.ANNOUNCE.value]},
|
||||||
}
|
}
|
||||||
return jsonify(
|
return jsonify(
|
||||||
**activitypub.build_ordered_collection(
|
**activitypub.build_ordered_collection(
|
||||||
|
Reference in New Issue
Block a user