mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-10-31 05:51:16 +00:00
13 lines
285 B
Elixir
13 lines
285 B
Elixir
|
defmodule Pleroma.Elasticsearch.DocumentMappings.User do
|
||
|
def id(obj), do: obj.id
|
||
|
|
||
|
def encode(%{actor_type: "Person"} = user) do
|
||
|
%{
|
||
|
timestamp: user.inserted_at,
|
||
|
instance: URI.parse(user.ap_id).host,
|
||
|
nickname: user.nickname,
|
||
|
bio: user.bio
|
||
|
}
|
||
|
end
|
||
|
end
|