projects
/
akkoma
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms
[akkoma]
/
lib
/
pleroma
/
web
/
activity_pub
/
object_validators
/
types
/
recipients.ex
1
defmodule Pleroma.Web.ActivityPub.ObjectValidators.Types.Recipients do
2
use Ecto.Type
3
4
def type, do: {:array, :string}
5
6
def cast(object) when is_binary(object) do
7
cast([object])
8
end
9
10
def cast([_ | _] = data), do: {:ok, data}
11
12
def cast(_) do
13
:error
14
end
15
16
def dump(data) do
17
{:ok, data}
18
end
19
20
def load(data) do
21
{:ok, data}
22
end
23
end