Prevent non-local notices from rendering.

This commit is contained in:
Phil Hagelberg 2019-11-07 21:43:21 -08:00
parent 886a07ba57
commit 4729027f91

View file

@ -63,7 +63,7 @@ def represent(%Activity{object: %Object{data: data}} = activity, selected) do
def show(%{assigns: %{notice_id: notice_id}} = conn, _params) do def show(%{assigns: %{notice_id: notice_id}} = conn, _params) do
case Activity.get_by_id_with_object(notice_id) do case Activity.get_by_id_with_object(notice_id) do
%Activity{} = activity -> %Activity{local: true} = activity ->
%User{} = user = User.get_by_ap_id(activity.object.data["actor"]) %User{} = user = User.get_by_ap_id(activity.object.data["actor"])
meta = Metadata.build_tags(%{activity_id: notice_id, object: activity.object, user: user}) meta = Metadata.build_tags(%{activity_id: notice_id, object: activity.object, user: user})