forked from mirrors/bookwyrm
Python formatting
This commit is contained in:
parent
7eb494b4ab
commit
73185c6e40
2 changed files with 2 additions and 4 deletions
|
@ -67,7 +67,7 @@ class ActivityStream(ABC):
|
||||||
def stream_users(self, status): # pylint: disable=no-self-use
|
def stream_users(self, status): # pylint: disable=no-self-use
|
||||||
""" given a status, what users should see it """
|
""" given a status, what users should see it """
|
||||||
# direct messages don't appeard in feeds, direct comments/reviews/etc do
|
# direct messages don't appeard in feeds, direct comments/reviews/etc do
|
||||||
if status.privacy == "direct" and status.status_type == 'Note':
|
if status.privacy == "direct" and status.status_type == "Note":
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# everybody who could plausibly see this status
|
# everybody who could plausibly see this status
|
||||||
|
|
|
@ -75,9 +75,7 @@ class DirectMessage(View):
|
||||||
if user:
|
if user:
|
||||||
queryset = queryset.filter(Q(user=user) | Q(mention_users=user))
|
queryset = queryset.filter(Q(user=user) | Q(mention_users=user))
|
||||||
|
|
||||||
activities = privacy_filter(
|
activities = privacy_filter(request.user, queryset, privacy_levels=["direct"])
|
||||||
request.user, queryset, privacy_levels=["direct"]
|
|
||||||
)
|
|
||||||
|
|
||||||
paginated = Paginator(activities, PAGE_LENGTH)
|
paginated = Paginator(activities, PAGE_LENGTH)
|
||||||
activity_page = paginated.page(page)
|
activity_page = paginated.page(page)
|
||||||
|
|
Loading…
Reference in a new issue