diff options
author | feld <feld@feld.me> | 2021-02-26 16:49:11 +0000 |
---|---|---|
committer | feld <feld@feld.me> | 2021-02-26 16:49:11 +0000 |
commit | 840686ecd5b57a210415539d4f5cc1038d25e5ce (patch) | |
tree | b205b3e7acece4cd5ef095f987a00ef9eade1a35 /lib | |
parent | 2217b35bd40593f5dcfdba4c13dd7b7bded018f3 (diff) | |
parent | 1e6c27181e0bbfad3fbd964d770cd4d547c10236 (diff) | |
download | pleroma-840686ecd5b57a210415539d4f5cc1038d25e5ce.tar.gz |
Merge branch 'fix/2498-expires_in-scheduled-posts' into 'develop'
expires_in in scheduled status params
Closes #2498
See merge request pleroma/pleroma!3315
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/api_spec/schemas/scheduled_status.ex | 6 | ||||
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/scheduled_activity_view.ex | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/pleroma/web/api_spec/schemas/scheduled_status.ex b/lib/pleroma/web/api_spec/schemas/scheduled_status.ex index cc051046a..607586e32 100644 --- a/lib/pleroma/web/api_spec/schemas/scheduled_status.ex +++ b/lib/pleroma/web/api_spec/schemas/scheduled_status.ex @@ -30,7 +30,8 @@ defmodule Pleroma.Web.ApiSpec.Schemas.ScheduledStatus do visibility: %Schema{allOf: [VisibilityScope], nullable: true}, scheduled_at: %Schema{type: :string, format: :"date-time", nullable: true}, poll: StatusOperation.poll_params(), - in_reply_to_id: %Schema{type: :string, nullable: true} + in_reply_to_id: %Schema{type: :string, nullable: true}, + expires_in: %Schema{type: :integer, nullable: true} } } }, @@ -46,7 +47,8 @@ defmodule Pleroma.Web.ApiSpec.Schemas.ScheduledStatus do scheduled_at: nil, poll: nil, idempotency: nil, - in_reply_to_id: nil + in_reply_to_id: nil, + expires_in: nil }, media_attachments: [Attachment.schema().example] } diff --git a/lib/pleroma/web/mastodon_api/views/scheduled_activity_view.ex b/lib/pleroma/web/mastodon_api/views/scheduled_activity_view.ex index 13774d237..453221f41 100644 --- a/lib/pleroma/web/mastodon_api/views/scheduled_activity_view.ex +++ b/lib/pleroma/web/mastodon_api/views/scheduled_activity_view.ex @@ -37,7 +37,8 @@ defmodule Pleroma.Web.MastodonAPI.ScheduledActivityView do visibility: params["visibility"], scheduled_at: params["scheduled_at"], poll: params["poll"], - in_reply_to_id: params["in_reply_to_id"] + in_reply_to_id: params["in_reply_to_id"], + expires_in: params["expires_in"] } |> Pleroma.Maps.put_if_present(:media_ids, params["media_ids"]) end |