mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-27 16:24:23 +00:00
Allow posting images without text in mastofe
This commit is contained in:
parent
0a0c6bf394
commit
b4292295d7
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -25,4 +25,7 @@ erl_crash.dump
|
|||
/config/setup_db.psql
|
||||
|
||||
.DS_Store
|
||||
.env
|
||||
.env
|
||||
|
||||
# Editor configs
|
||||
/.vscode
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue