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 diff --git a/test/fixtures/ostatus_incoming_post_tag.xml b/test/fixtures/ostatus_incoming_post_tag.xml index 5febb80d1..0f99c4126 100644 --- a/test/fixtures/ostatus_incoming_post_tag.xml +++ b/test/fixtures/ostatus_incoming_post_tag.xml @@ -43,6 +43,7 @@