Pleroma.Object/1: take %Object{} as argument instead
This commit is contained in:
parent
87b13c5430
commit
18b536c176
9 changed files with 12 additions and 17 deletions
|
|
@ -345,7 +345,7 @@ defmodule Pleroma.Object do
|
|||
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(%Object{data: %{"hashtags" => hashtags}}), do: hashtags || []
|
||||
def hashtags(%Object{data: %{"tag" => tags}}), do: Enum.filter(tags, &is_bitstring(&1))
|
||||
def hashtags(_), do: []
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue