end
end
- def is_public?(%Object{data: %{"type" => "Tombstone"}}) do
- false
- end
+ def is_public?(%Object{data: %{"type" => "Tombstone"}}), do: false
+ def is_public?(%Activity{data: data}), do: is_public?(data)
- def is_public?(activity) do
- "https://www.w3.org/ns/activitystreams#Public" in (activity.data["to"] ++
- (activity.data["cc"] || []))
+ def is_public?(data) do
+ "https://www.w3.org/ns/activitystreams#Public" in (data["to"] ++ (data["cc"] || []))
end
def visible_for_user?(activity, nil) do