Remove recipients from activities schema

This commit is contained in:
Shadowfacts 2019-09-30 16:52:37 -04:00
parent ae9da65e1b
commit 6318c16afe
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
2 changed files with 2 additions and 4 deletions

View File

@ -10,7 +10,6 @@ defmodule Clacks.Activity do
field :data, :map
field :local, :boolean
field :actor, :string
field :recipients, {:array, :string}, default: []
has_one :object, Clacks.Object, on_delete: :nothing, foreign_key: :id
@ -19,7 +18,7 @@ defmodule Clacks.Activity do
def changeset(%__MODULE__{} = schema, attrs) do
schema
|> cast(attrs, [:data, :local, :actor, :recipients])
|> validate_required([:data, :local, :actor, :recipients])
|> cast(attrs, [:data, :local, :actor])
|> validate_required([:data, :local, :actor])
end
end

View File

@ -8,7 +8,6 @@ defmodule Clacks.Repo.Migrations.CreateActivities do
add :data, :jsonb, null: false
add :local, :boolean
add :actor, :string
add :recipients, {:array, :string}
timestamps()
end