Redirect to correct url with slug
This commit is contained in:
parent
ebf463fc91
commit
d8181d6d66
7 changed files with 40 additions and 6 deletions
|
@ -15,7 +15,7 @@ from bookwyrm.activitypub import ActivitypubResponse
|
|||
from bookwyrm.settings import PAGE_LENGTH, STREAMS
|
||||
from bookwyrm.suggested_users import suggested_users
|
||||
from .helpers import filter_stream_by_status_type, get_user_from_username
|
||||
from .helpers import is_api_request, is_bookwyrm_request
|
||||
from .helpers import is_api_request, is_bookwyrm_request, maybe_redirect_local_path
|
||||
from .annual_summary import get_annual_summary_year
|
||||
|
||||
|
||||
|
@ -130,6 +130,9 @@ class Status(View):
|
|||
status.to_activity(pure=not is_bookwyrm_request(request))
|
||||
)
|
||||
|
||||
if r := maybe_redirect_local_path(request, status):
|
||||
return r
|
||||
|
||||
visible_thread = (
|
||||
models.Status.privacy_filter(request.user)
|
||||
.filter(thread_id=status.thread_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue