aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRachel H <lastexyle@gmail.com>2018-06-05 23:47:16 -0700
committerRachel H <lastexyle@gmail.com>2018-06-06 11:29:49 -0700
commitb4292295d7fe629c6a29f221cab1deae1ec3008c (patch)
treed2f809ba4218c04b23a42377a2769068973fcd80
parent0a0c6bf3945d6da98d3e5a08205a9b4f24adb67f (diff)
downloadpleroma-b4292295d7fe629c6a29f221cab1deae1ec3008c.tar.gz
Allow posting images without text in mastofe
-rw-r--r--.gitignore5
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api_controller.ex11
2 files changed, 14 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 3fbf17ba8..2ed4c7c82 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
index 4252ac2fe..974da5203 100644
--- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@ -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