projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'remotes/origin/develop' into feature/object-hashtags...
[akkoma]
/
lib
/
pleroma
/
web
/
activity_pub
/
transmogrifier.ex
diff --git
a/lib/pleroma/web/activity_pub/transmogrifier.ex
b/lib/pleroma/web/activity_pub/transmogrifier.ex
index 4d9a5617eb9b5b3fcdebfb44b0e3cf0ee9c8aed3..0a701334f00d08f7f57e2a8ac963e2e526414c2e 100644
(file)
--- a/
lib/pleroma/web/activity_pub/transmogrifier.ex
+++ b/
lib/pleroma/web/activity_pub/transmogrifier.ex
@@
-32,18
+32,18
@@
defmodule Pleroma.Web.ActivityPub.Transmogrifier do
"""
def fix_object(object, options \\ []) do
object
"""
def fix_object(object, options \\ []) do
object
- |> strip_internal_fields
- |> fix_actor
- |> fix_url
- |> fix_attachments
- |> fix_context
+ |> strip_internal_fields
()
+ |> fix_actor
()
+ |> fix_url
()
+ |> fix_attachments
()
+ |> fix_context
()
|> fix_in_reply_to(options)
|> fix_in_reply_to(options)
- |> fix_emoji
- |> fix_tag
- |> set_sensitive
- |> fix_content_map
- |> fix_addressing
- |> fix_summary
+ |> fix_emoji
()
+ |> fix_tag
()
+ |> set_sensitive
()
+ |> fix_content_map
()
+ |> fix_addressing
()
+ |> fix_summary
()
|> fix_type(options)
end
|> fix_type(options)
end
@@
-315,10
+315,9
@@
defmodule Pleroma.Web.ActivityPub.Transmogrifier do
tags =
tag
|> Enum.filter(fn data -> data["type"] == "Hashtag" and data["name"] end)
tags =
tag
|> Enum.filter(fn data -> data["type"] == "Hashtag" and data["name"] end)
- |> Enum.map(fn %{"name" => name} ->
- name
- |> String.slice(1..-1)
- |> String.downcase()
+ |> Enum.map(fn
+ %{"name" => "#" <> hashtag} -> String.downcase(hashtag)
+ %{"name" => hashtag} -> String.downcase(hashtag)
end)
Map.put(object, "tag", tag ++ tags)
end)
Map.put(object, "tag", tag ++ tags)