Skip to content
Snippets Groups Projects
Commit b4292295 authored by Rachel H's avatar Rachel H
Browse files

Allow posting images without text in mastofe

parent 0a0c6bf3
No related branches found
No related tags found
No related merge requests found
......@@ -25,4 +25,7 @@ erl_crash.dump
/config/setup_db.psql
.DS_Store
.env
\ No newline at end of file
.env
# Editor configs
/.vscode
\ No newline at end of file
......@@ -247,7 +247,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
end
end
def dm_timeline(%{assigns: %{user: user}} = conn, params) do
def dm_timeline(%{assigns: %{user: user}} = conn, _params) do
query =
ActivityPub.fetch_activities_query([user.ap_id], %{"type" => "Create", visibility: "direct"})
......@@ -300,6 +300,15 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
end
end
def post_status(conn, %{"status" => "", "media_ids" => media_ids} = params)
when length(media_ids) > 0 do
params =
params
|> Map.put("status", ".")
post_status(conn, params)
end
def post_status(%{assigns: %{user: user}} = conn, %{"status" => _} = params) do
params =
params
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment