forked from AkkomaGang/akkoma
add timestamp
This commit is contained in:
parent
2152832780
commit
9134ef5ecb
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue