Merge branch 'features/hashtag-column' into 'develop'
Insert text representation of hashtags into object["hashtags"] See merge request pleroma/pleroma!2824
This commit is contained in:
commit
b122b6ffa3
24 changed files with 163 additions and 70 deletions
|
|
@ -346,4 +346,8 @@ defmodule Pleroma.Object do
|
|||
|
||||
def self_replies(object, opts \\ []),
|
||||
do: replies(object, Keyword.put(opts, :self_only, true))
|
||||
|
||||
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