From: lain Date: Fri, 30 Mar 2018 10:19:57 +0000 (+0200) Subject: Fix TwApi reply visibility. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=675839e13c1e6665f70779bbecadc8bdf6ebfe9e;p=akkoma Fix TwApi reply visibility. --- 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 @@ defmodule Pleroma.Web.CommonAPI 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