From 675839e13c1e6665f70779bbecadc8bdf6ebfe9e Mon Sep 17 00:00:00 2001 From: lain Date: Fri, 30 Mar 2018 12:19:57 +0200 Subject: [PATCH] Fix TwApi reply visibility. --- lib/pleroma/web/common_api/common_api.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex index 0f84542f0..5fc940261 100644 --- a/lib/pleroma/web/common_api/common_api.ex +++ b/lib/pleroma/web/common_api/common_api.ex @@ -46,8 +46,8 @@ def unfavorite(id_or_ap_id, user) do end end - def get_visibility(%{"visibility" => visibility}), do: visibility - def get_visibility(%{"in_reply_to_status_id" => status_id}) when status_id do + def get_visibility(%{"visibility" => visibility}) when visibility in ~w{public unlisted private direct}, do: visibility + def get_visibility(%{"in_reply_to_status_id" => status_id}) when not is_nil(status_id) do inReplyTo = get_replied_to_activity(status_id) Pleroma.Web.MastodonAPI.StatusView.get_visibility(inReplyTo.data["object"]) end