Outbox sensitive to user agent strings

This commit is contained in:
Mouse Reeve
2021-02-23 11:34:15 -08:00
parent 27d81306e3
commit 6e09d485c4
6 changed files with 53 additions and 11 deletions

View File

@ -4,6 +4,7 @@ from django.shortcuts import get_object_or_404
from django.views import View
from bookwyrm import activitypub, models
from .helpers import is_bookwyrm_request
# pylint: disable= no-self-use
@ -17,6 +18,10 @@ class Outbox(View):
filter_type = None
return JsonResponse(
user.to_outbox(**request.GET, filter_type=filter_type),
user.to_outbox(
**request.GET,
filter_type=filter_type,
pure=not is_bookwyrm_request(request)
),
encoder=activitypub.ActivityEncoder
)