Browse Source

Remove recipients from activities schema

master
Shadowfacts 2 years ago
parent
commit
6318c16afe
Signed by: shadowfacts GPG Key ID: 94A5AB95422746E5
2 changed files with 2 additions and 4 deletions
  1. +2
    -3
      lib/clacks/activity.ex
  2. +0
    -1
      priv/repo/migrations/20190928212118_create_activities.exs

+ 2
- 3
lib/clacks/activity.ex 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

+ 0
- 1
priv/repo/migrations/20190928212118_create_activities.exs 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


Loading…
Cancel
Save