From: FloatingGhost Date: Thu, 16 Dec 2021 16:05:18 +0000 (+0000) Subject: add timestamp X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=9134ef5ecb72f6fe2042f978be3deef41c9b4ce7;p=akkoma add timestamp --- diff --git a/lib/pleroma/elasticsearch/document_mappings/hashtag.ex b/lib/pleroma/elasticsearch/document_mappings/hashtag.ex index ddf91231c..508e32131 100644 --- a/lib/pleroma/elasticsearch/document_mappings/hashtag.ex +++ b/lib/pleroma/elasticsearch/document_mappings/hashtag.ex @@ -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