aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-02-02 14:55:06 +0300
committerrinpatch <rinpatch@sdf.org>2020-02-02 14:55:06 +0300
commit50f5a920219d6637582a1998fd33ec4552e02e9c (patch)
tree34eb27d4bb841063db0752541b2ad752d34cb390 /lib
parentc27d1d65bfd60effdb45359697141c136e156177 (diff)
downloadpleroma-50f5a920219d6637582a1998fd33ec4552e02e9c.tar.gz
fix not being able to pin polls
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/common_api/common_api.ex3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex
index c05a6c544..2a348dcf6 100644
--- a/lib/pleroma/web/common_api/common_api.ex
+++ b/lib/pleroma/web/common_api/common_api.ex
@@ -315,8 +315,9 @@ defmodule Pleroma.Web.CommonAPI do
with %Activity{
actor: ^user_ap_id,
data: %{"type" => "Create"},
- object: %Object{data: %{"type" => "Note"}}
+ object: %Object{data: %{"type" => object_type}}
} = activity <- get_by_id_or_ap_id(id_or_ap_id),
+ true <- object_type in ["Note", "Article", "Question"],
true <- Visibility.is_public?(activity),
{:ok, _user} <- User.add_pinnned_activity(user, activity) do
{:ok, activity}