From 5b801ad3f5906227d28c9a94e9dae021179c03ce Mon Sep 17 00:00:00 2001 From: Fox Date: Thu, 9 Mar 2023 13:01:41 +0900 Subject: [PATCH] Why not allow quoting private messages? --- lib/pleroma/web/common_api/activity_draft.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/web/common_api/activity_draft.ex b/lib/pleroma/web/common_api/activity_draft.ex index 0879bf9a6..8275694e4 100644 --- a/lib/pleroma/web/common_api/activity_draft.ex +++ b/lib/pleroma/web/common_api/activity_draft.ex @@ -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