commit: 4a16ade2ee14d9efb679de5c0b9a9d1cdc800170
parent: c86823f724cff550bd4a394035f63218114b5d1d
Author: lambda <pleromagit@rogerbraun.net>
Date: Fri, 8 Jun 2018 06:02:21 +0000
Merge branch 'mastopost' into 'develop'
Allow posting images without text in mastofe
See merge request pleroma/pleroma!194
Diffstat:
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git 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