Merge branch 'bugfix/notice-external-redirect' into 'develop'
Redirect non-local activities when /notice/:id is used See merge request pleroma/pleroma!3300
This commit is contained in:
commit
ea5469961a
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