activity: drop recipients_to/recipients_cc fields
This commit is contained in:
parent
038139d641
commit
29b5e30c46
|
@ -8,8 +8,6 @@ defmodule Pleroma.Activity do
|
||||||
field(:local, :boolean, default: true)
|
field(:local, :boolean, default: true)
|
||||||
field(:actor, :string)
|
field(:actor, :string)
|
||||||
field(:recipients, {:array, :string})
|
field(:recipients, {:array, :string})
|
||||||
field(:recipients_to, {:array, :string})
|
|
||||||
field(:recipients_cc, {:array, :string})
|
|
||||||
has_many(:notifications, Notification, on_delete: :delete_all)
|
has_many(:notifications, Notification, on_delete: :delete_all)
|
||||||
|
|
||||||
timestamps()
|
timestamps()
|
||||||
|
|
|
@ -60,16 +60,14 @@ def insert(map, local \\ true) when is_map(map) do
|
||||||
:ok <- check_actor_is_active(map["actor"]),
|
:ok <- check_actor_is_active(map["actor"]),
|
||||||
{:ok, map} <- MRF.filter(map),
|
{:ok, map} <- MRF.filter(map),
|
||||||
:ok <- insert_full_object(map) do
|
:ok <- insert_full_object(map) do
|
||||||
{recipients, recipients_to, recipients_cc} = get_recipients(map)
|
{recipients, _, _} = get_recipients(map)
|
||||||
|
|
||||||
{:ok, activity} =
|
{:ok, activity} =
|
||||||
Repo.insert(%Activity{
|
Repo.insert(%Activity{
|
||||||
data: map,
|
data: map,
|
||||||
local: local,
|
local: local,
|
||||||
actor: map["actor"],
|
actor: map["actor"],
|
||||||
recipients: recipients,
|
recipients: recipients
|
||||||
recipients_to: recipients_to,
|
|
||||||
recipients_cc: recipients_cc
|
|
||||||
})
|
})
|
||||||
|
|
||||||
Notification.create_notifications(activity)
|
Notification.create_notifications(activity)
|
||||||
|
|
Loading…
Reference in New Issue