add timestamp

This commit is contained in:
FloatingGhost 2021-12-16 16:05:18 +00:00
parent 655bd7e67b
commit 4440ea0981

View file

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