Merge remote-tracking branch 'upstream/bookwyrm-entities' into develop
[akkoma] / lib / pleroma / elasticsearch / document_mappings / hashtag.ex
index 1c47d1451d522e57ded33ca98886e531d593eb11..ce9a86c8d07edf4f61c044f98dff87b3a46675d7 100644 (file)
@@ -1,6 +1,13 @@
 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,