mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-10-31 22:19:00 +00:00
Merge branch 'main' into production
This commit is contained in:
commit
b46ec147da
1 changed files with 3 additions and 5 deletions
|
@ -4,7 +4,6 @@ from django.contrib.syndication.views import Feed
|
||||||
from django.template.loader import get_template
|
from django.template.loader import get_template
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from bookwyrm import models
|
|
||||||
from .helpers import get_user_from_username
|
from .helpers import get_user_from_username
|
||||||
|
|
||||||
# pylint: disable=no-self-use, unused-argument
|
# pylint: disable=no-self-use, unused-argument
|
||||||
|
@ -36,10 +35,9 @@ class RssFeed(Feed):
|
||||||
|
|
||||||
def items(self, obj):
|
def items(self, obj):
|
||||||
"""the user's activity feed"""
|
"""the user's activity feed"""
|
||||||
return models.Status.privacy_filter(
|
return obj.status_set.select_subclasses().filter(
|
||||||
obj,
|
privacy__in=["public", "unlisted"],
|
||||||
privacy_levels=["public", "unlisted"],
|
)[:10]
|
||||||
).filter(user=obj)
|
|
||||||
|
|
||||||
def item_link(self, item):
|
def item_link(self, item):
|
||||||
"""link to the status"""
|
"""link to the status"""
|
||||||
|
|
Loading…
Reference in a new issue