Added limits and media attachments for scheduled activities.

This commit is contained in:
eugenijm 2019-04-02 01:31:01 +03:00
commit fc92a0fd8d
11 changed files with 327 additions and 30 deletions

View file

@ -23,14 +23,6 @@ defmodule Pleroma.Factory do
}
end
def scheduled_activity_factory do
%Pleroma.ScheduledActivity{
user: build(:user),
scheduled_at: NaiveDateTime.add(NaiveDateTime.utc_now(), :timer.minutes(60), :millisecond),
params: build(:note) |> Map.from_struct() |> Map.get(:data)
}
end
def note_factory(attrs \\ %{}) do
text = sequence(:text, &"This is :moominmamma: note #{&1}")
@ -275,4 +267,12 @@ defmodule Pleroma.Factory do
user: build(:user)
}
end
def scheduled_activity_factory do
%Pleroma.ScheduledActivity{
user: build(:user),
scheduled_at: NaiveDateTime.add(NaiveDateTime.utc_now(), :timer.minutes(60), :millisecond),
params: build(:note) |> Map.from_struct() |> Map.get(:data)
}
end
end