Redirect non-local activities when /notice/:id is used
Related-to: https://git.pleroma.social/pleroma/pleroma/-/issues/2496
This commit is contained in:
parent
fd2477dfba
commit
ecff027418
3 changed files with 14 additions and 11 deletions
|
|
@ -73,12 +73,8 @@ defmodule Pleroma.Web.OStatus.OStatusController do
|
|||
%User{} = user <- User.get_cached_by_ap_id(activity.data["actor"]) do
|
||||
cond do
|
||||
format in ["json", "activity+json"] ->
|
||||
if activity.local do
|
||||
%{data: %{"id" => redirect_url}} = Object.normalize(activity, fetch: false)
|
||||
redirect(conn, external: redirect_url)
|
||||
else
|
||||
{:error, :not_found}
|
||||
end
|
||||
%{data: %{"id" => redirect_url}} = Object.normalize(activity, fetch: false)
|
||||
redirect(conn, external: redirect_url)
|
||||
|
||||
activity.data["type"] == "Create" ->
|
||||
%Object{} = object = Object.normalize(activity, fetch: false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue