diff options
author | Roger Braun <roger@rogerbraun.net> | 2017-11-01 09:33:29 +0100 |
---|---|---|
committer | Roger Braun <roger@rogerbraun.net> | 2017-11-01 09:33:29 +0100 |
commit | 9be286a9004ae60f8ea48bb0c8871d70223f082b (patch) | |
tree | d80ba5898cf3fc0c1f2a610acafd339681784e62 /lib | |
parent | 6f05367325e7d773ca7199948fd5b49409f6d78d (diff) | |
download | pleroma-9be286a9004ae60f8ea48bb0c8871d70223f082b.tar.gz |
Handle empty terms / tags.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/ostatus/ostatus.ex | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pleroma/web/ostatus/ostatus.ex b/lib/pleroma/web/ostatus/ostatus.ex index 1e8b71357..308e206c5 100644 --- a/lib/pleroma/web/ostatus/ostatus.ex +++ b/lib/pleroma/web/ostatus/ostatus.ex @@ -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 |