Save incoming tags as lowercase.

This commit is contained in:
Roger Braun 2017-06-18 19:01:54 +02:00
parent fa82822932
commit 5ff4a5eee3
2 changed files with 2 additions and 2 deletions

View File

@ -149,7 +149,7 @@ def get_content(entry) do
def get_tags(entry) do def get_tags(entry) do
:xmerl_xpath.string('//category', entry) :xmerl_xpath.string('//category', entry)
|> Enum.map(fn (category) -> string_from_xpath("/category/@term", category) end) |> Enum.map(fn (category) -> string_from_xpath("/category/@term", category) |> String.downcase end)
end end
def maybe_update(doc, user) do def maybe_update(doc, user) do

View File

@ -42,7 +42,7 @@
<id>tag:social.heldscal.la,2017-04-29:noticeId=1967725:objectType=note</id> <id>tag:social.heldscal.la,2017-04-29:noticeId=1967725:objectType=note</id>
<title>New note by lambadalambda</title> <title>New note by lambadalambda</title>
<content type="html">Will it blend?</content> <content type="html">Will it blend?</content>
<category term="nsfw"/> <category term="Nsfw"/>
<link rel="alternate" type="text/html" href="https://social.heldscal.la/notice/1967725"/> <link rel="alternate" type="text/html" href="https://social.heldscal.la/notice/1967725"/>
<status_net notice_id="1967725"></status_net> <status_net notice_id="1967725"></status_net>
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb> <activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>