Merge remote-tracking branch 'origin/develop' into feature/embeddable-posts

This commit is contained in:
Egor Kislitsyn 2020-06-01 17:38:57 +04:00
commit 6b84c62d4a
No known key found for this signature in database
GPG key ID: 1B49CB15B71E7805
1189 changed files with 35957 additions and 14253 deletions

View file

@ -19,15 +19,6 @@ defmodule Pleroma.Web.EmbedView do
@media_types ["image", "audio", "video"]
defp emoji_for_user(%User{} = user) do
user.source_data
|> Map.get("tag", [])
|> Enum.filter(fn %{"type" => t} -> t == "Emoji" end)
|> Enum.map(fn %{"icon" => %{"url" => url}, "name" => name} ->
{String.trim(name, ":"), url}
end)
end
defp fetch_media_type(%{"mediaType" => mediaType}) do
Utils.fetch_media_type(@media_types, mediaType)
end

View file

@ -25,7 +25,7 @@ defmodule Pleroma.Web.StreamerView do
|> Jason.encode!()
end
def render("notification.json", %User{} = user, %Notification{} = notify) do
def render("notification.json", %Notification{} = notify, %User{} = user) do
%{
event: "notification",
payload: