add timestamp

This commit is contained in:
FloatingGhost 2021-12-16 16:05:18 +00:00
parent 2152832780
commit 9134ef5ecb

View file

@ -1,10 +1,17 @@
defmodule Pleroma.Elasticsearch.DocumentMappings.Hashtag do
def id(obj), do: obj.id
def encode(%{timestamp: _} = hashtag) do
%{
hashtag: hashtag.name,
timestamp: hashtag.timestamp
}
end
def encode(hashtag) do
%{
hashtag: hashtag.name,
timestamp: hashtag.timestamp
timestamp: hashtag.inserted_at
}
end
end