mirror of
https://git.youjo.love/youjo/youjo-be.git
synced 2024-11-20 05:49:54 +01:00
Why not allow quoting private messages?
This commit is contained in:
parent
b5b0a0d332
commit
5b801ad3f5
1 changed files with 2 additions and 2 deletions
|
@ -119,14 +119,14 @@ defmodule Pleroma.Web.CommonAPI.ActivityDraft do
|
|||
defp quote_id(%{params: %{quote_id: id}} = draft) when is_binary(id) do
|
||||
with {:activity, %Activity{} = quote} <- {:activity, Activity.get_by_id(id)},
|
||||
visibility <- CommonAPI.get_quoted_visibility(quote),
|
||||
{:visibility, true} <- {:visibility, visibility in ["public", "unlisted"]} do
|
||||
{:visibility, true} <- {:visibility, visibility in ["public", "unlisted", "private"]} do
|
||||
%__MODULE__{draft | quote: Activity.get_by_id(id)}
|
||||
else
|
||||
{:activity, _} ->
|
||||
add_error(draft, dgettext("errors", "You can't quote a status that doesn't exist"))
|
||||
|
||||
{:visibility, false} ->
|
||||
add_error(draft, dgettext("errors", "You can only quote public or unlisted statuses"))
|
||||
add_error(draft, dgettext("errors", "You can't quote a direct message"))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue