Merge remote-tracking branch 'origin/feature/elasticsearch' into develop
[akkoma] / lib / pleroma / elasticsearch / document_mappings / hashtag.ex
1 defmodule Pleroma.Elasticsearch.DocumentMappings.Hashtag do
2 def id(obj), do: obj.id
3
4 def encode(%{timestamp: _} = hashtag) do
5 %{
6 hashtag: hashtag.name,
7 timestamp: hashtag.timestamp
8 }
9 end
10
11 def encode(hashtag) do
12 %{
13 hashtag: hashtag.name,
14 timestamp: hashtag.inserted_at
15 }
16 end
17 end