1 # Akkoma: A lightweight social networking server
2 # Copyright © 2022-2022 Akkoma Authors <https://git.ihatebeinga.live/IHBAGang/akkoma/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Elasticsearch.DocumentMappings.Hashtag do
6 def id(obj), do: obj.id
8 def encode(%{timestamp: _} = hashtag) do
10 hashtag: hashtag.name,
11 timestamp: hashtag.timestamp
15 def encode(hashtag) do
17 hashtag: hashtag.name,
18 timestamp: hashtag.inserted_at