Handle empty terms / tags.

This commit is contained in:
Roger Braun 2017-11-01 09:33:29 +01:00
commit 9be286a900
2 changed files with 4 additions and 1 deletions

View file

@ -169,7 +169,9 @@ defmodule Pleroma.Web.OStatus do
def get_tags(entry) do
:xmerl_xpath.string('//category', entry)
|> Enum.map(fn (category) -> string_from_xpath("/category/@term", category) |> String.downcase end)
|> Enum.map(fn (category) -> string_from_xpath("/category/@term", category) end)
|> Enum.filter(&(&1))
|> Enum.map(&String.downcase/1)
end
def maybe_update(doc, user) do