Commit 7c003991 authored by lain's avatar lain
Browse files

Merge branch 'fix/preview-not-working-with-form-data' into 'develop'

Fix preview not being usable in form data

See merge request pleroma/pleroma!1013
parents 0cb94cfa 79cb34a4
Pipeline #9918 passed with stages
in 4 minutes and 14 seconds
......@@ -47,6 +47,6 @@ Has these additional fields under the `pleroma` object:
## POST `/api/v1/statuses`
Additional parameters can be added to the JSON body:
Additional parameters can be added to the JSON body/Form data:
- `preview`: boolean, if set to `true` the post won't be actually posted, but the status entitiy would still be rendered back. This could be useful for previewing rich text/custom emoji, for example.
......@@ -180,7 +180,7 @@ def post(user, %{"status" => status} = data) do
object: object,
additional: %{"cc" => cc, "directMessage" => visibility == "direct"}
data["preview"] || false
Pleroma.Web.ControllerHelper.truthy_param?(data["preview"]) || false
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment