end
end
- defp poll_is_multiple?(%Object{data: %{"anyOf" => anyOf}}) do
- !Enum.empty?(anyOf)
- end
+ defp poll_is_multiple?(%Object{data: %{"anyOf" => [_ | _]}}), do: true
defp poll_is_multiple?(_), do: false
def self_replies(object, opts \\ []),
do: replies(object, Keyword.put(opts, :self_only, true))
+
+ def hashtags(%{"hashtags" => hashtags}), do: hashtags || []
+ def hashtags(%{"tag" => tags}), do: Enum.filter(tags, &is_bitstring(&1))
+ def hashtags(_), do: []
end