Merge branch 'feature/funkwhale-audio' into 'develop'

Add support for funkwhale Audio activity

Closes #764 and #1624

See merge request pleroma/pleroma!2287
This commit is contained in:
Haelwenn 2020-03-29 19:18:22 +00:00
commit e999c67cee
7 changed files with 124 additions and 4 deletions

View file

@ -431,6 +431,22 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
assert length(represented[:media_attachments]) == 1
end
test "funkwhale audio" do
user = insert(:user)
{:ok, object} =
Pleroma.Object.Fetcher.fetch_object_from_id(
"https://channels.tests.funkwhale.audio/federation/music/uploads/42342395-0208-4fee-a38d-259a6dae0871"
)
%Activity{} = activity = Activity.get_create_by_object_ap_id(object.data["id"])
represented = StatusView.render("show.json", %{for: user, activity: activity})
assert represented[:id] == to_string(activity.id)
assert length(represented[:media_attachments]) == 1
end
test "a Mobilizon event" do
user = insert(:user)