forked from YokaiRick/akkoma
Merge branch 'mastopost' into 'develop'
Allow posting images without text in mastofe See merge request pleroma/pleroma!194
This commit is contained in:
commit
4a16ade2ee
1 changed files with 10 additions and 1 deletions
|
@ -247,7 +247,7 @@ def user_statuses(%{assigns: %{user: reading_user}} = conn, params) 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 @@ def get_context(%{assigns: %{user: user}} = conn, %{"id" => id}) 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