+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Pleroma.Web.OStatus.OStatusController do
use Pleroma.Web, :controller
"html" ->
conn
|> put_resp_content_type("text/html")
- |> send_file(200, Application.app_dir(:pleroma, "priv/static/index.html"))
+ |> send_file(200, Pleroma.Plugs.InstanceStatic.file_path("index.html"))
_ ->
represent_activity(conn, format, activity, user)
conn,
"activity+json",
%Activity{data: %{"type" => "Create"}} = activity,
- user
+ _user
) do
object = Object.normalize(activity.data["object"])
|> json(ObjectView.render("object.json", %{object: object}))
end
- defp represent_activity(conn, "activity+json", _, _) do
+ defp represent_activity(_conn, "activity+json", _, _) do
{:error, :not_found}
end