Hotfix for tag problems.
authorlain <lain@soykaf.club>
Sat, 24 Feb 2018 21:28:22 +0000 (22:28 +0100)
committerlain <lain@soykaf.club>
Sat, 24 Feb 2018 21:28:22 +0000 (22:28 +0100)
lib/pleroma/web/ostatus/activity_representer.ex

index 33e5e000990ea893f463cbc09579b1bc2556548b..c8ade52a486f29ae8bdbe09bf9bf92ee9a846f2d 100644 (file)
@@ -79,7 +79,14 @@ defmodule Pleroma.Web.OStatus.ActivityRepresenter do
     mentions = activity.recipients |> get_mentions
 
     categories = (activity.data["object"]["tag"] || [])
-    |> Enum.map(fn (tag) -> {:category, [term: to_charlist(tag)], []} end)
+    |> Enum.map(fn (tag) ->
+      if is_binary(tag) do
+        {:category, [term: to_charlist(tag)], []}
+      else
+        nil
+      end
+    end)
+    |> Enum.filter(&(&1))
 
     emoji_links = get_emoji_links(activity.data["object"]["emoji"] || %{})