add copyright notice for forked files
[akkoma] / lib / pleroma / elasticsearch / document_mappings / user.ex
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
4
5 defmodule Pleroma.Elasticsearch.DocumentMappings.User do
6 def id(obj), do: obj.id
7
8 def encode(%{actor_type: "Person"} = user) do
9 %{
10 timestamp: user.inserted_at,
11 instance: URI.parse(user.ap_id).host,
12 nickname: user.nickname,
13 bio: user.bio,
14 display_name: user.name
15 }
16 end
17 end