object: containment: don't try to contain ostatus objects

This commit is contained in:
Ariadne Conill 2019-10-18 03:26:50 +00:00
parent 85ddcaf418
commit bf2107743f

View file

@ -57,7 +57,9 @@ def contain_origin_from_id(id, %{"id" => other_id} = _params) do
id_uri = URI.parse(id)
other_uri = URI.parse(other_id)
if id_uri.host == other_uri.host do
# We explicitly allow 'tag' URIs through, due to legacy OStatus objects
# being present in the ActivityPub network.
if id_uri.host == other_uri.host || other_uri.scheme == "tag" do
:ok
else
:error