WIP. Implement oembed route and handle both json/xml for "Note" type activity

This commit is contained in:
raeno 2018-12-10 23:08:02 +04:00
commit 8902942128
9 changed files with 142 additions and 5 deletions

View file

@ -31,7 +31,7 @@ defmodule Pleroma.Web.OStatus do
def oembed_links(url) do
Enum.map(["xml", "json"], fn format ->
href = oembed_path(url, format)
"<link rel=\"alternate\" type=\"application/#{format}+oembed\" href=\"#{href}\""
"<link rel=\"alternate\" type=\"application/#{format}+oembed\" href=\"#{href}\">"
end)
|> Enum.join("\r\n")
end

View file

@ -9,7 +9,6 @@ defmodule Pleroma.Web.OStatus.OStatusController do
alias Pleroma.Web.ActivityPub.ObjectView
alias Pleroma.Web.ActivityPub.ActivityPubController
alias Pleroma.Web.ActivityPub.ActivityPub
alias Pleroma.Router.Helpers, as: Routes
plug(Pleroma.Web.FederatingPlug when action in [:salmon_incoming])
action_fallback(:errors)