diff options
author | lambda <pleromagit@rogerbraun.net> | 2018-06-08 06:02:21 +0000 |
---|---|---|
committer | lambda <pleromagit@rogerbraun.net> | 2018-06-08 06:02:21 +0000 |
commit | 4a16ade2ee14d9efb679de5c0b9a9d1cdc800170 (patch) | |
tree | 5fdde9ce6696f2725c9dff359dde5700e23ef9b2 | |
parent | c86823f724cff550bd4a394035f63218114b5d1d (diff) | |
parent | 839cb7b42404f86bdfcf043c5e8dbce08dd3928c (diff) | |
download | pleroma-4a16ade2ee14d9efb679de5c0b9a9d1cdc800170.tar.gz |
Merge branch 'mastopost' into 'develop'
Allow posting images without text in mastofe
See merge request pleroma/pleroma!194
-rw-r--r-- | lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | 11 |
1 files changed, 10 insertions, 1 deletions
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 |