Add visibility to comments

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-01-14 16:21:13 +01:00
parent ab56d3e607
commit 2ece62bfb8
7 changed files with 31 additions and 22 deletions

View File

@@ -47,7 +47,7 @@ defmodule MobilizonWeb.ActivityPubController do
def event(conn, %{"uuid" => uuid}) do
with %Event{} = event <- Events.get_event_full_by_uuid(uuid),
true <- event.public do
true <- event.visibility in [:public, :unlisted] do
conn
|> put_resp_header("content-type", "application/activity+json")
|> json(ObjectView.render("event.json", %{event: event |> Utils.make_event_data()}))