ActivityPub: tags -> tag.

This commit is contained in:
lain 2018-02-17 14:20:53 +01:00
commit 5682e48a25
2 changed files with 5 additions and 5 deletions

View file

@ -58,12 +58,12 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
mentions = object["to"]
|> Enum.map(fn (ap_id) -> User.get_cached_by_ap_id(ap_id) end)
|> Enum.filter(&(&1))
|> Enum.map(fn(user) -> %{"type" => "mention", "href" => user.ap_id, "name" => "@#{user.nickname}"} end)
|> Enum.map(fn(user) -> %{"type" => "Mention", "href" => user.ap_id, "name" => "@#{user.nickname}"} end)
tags = object["tags"] || []
tags = object["tag"] || []
object
|> Map.put("tags", tags ++ mentions)
|> Map.put("tag", tags ++ mentions)
end
def add_attributed_to(object) do