mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 08:36:29 +00:00
transmogrifier: pro-actively add support for Hashtag without array in tag
This commit is contained in:
parent
2c820e10b8
commit
f3291acc91
1 changed files with 7 additions and 0 deletions
|
@ -206,6 +206,13 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|
|||
|> Map.put("tag", combined)
|
||||
end
|
||||
|
||||
def fix_tag(%{"tag" => %{"type" => "Hashtag"} = tag} = object) do
|
||||
combined = [tag ++ String.slice(tag["name"], 1..-1)]
|
||||
|
||||
object
|
||||
|> Map.put("tag", combined)
|
||||
end
|
||||
|
||||
def fix_tag(object) do
|
||||
object
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue