aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/common_api/common_api.ex
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2020-02-11 13:54:55 +0400
committerEgor Kislitsyn <egor@kislitsyn.com>2020-02-11 13:54:55 +0400
commit6875ccb6bfcc5ae62db26d38c3d5eac4c6f8706a (patch)
treedacb02d953473e3a0c6aeec58d86fb7fb1ed5886 /lib/pleroma/web/common_api/common_api.ex
parent3c4a30c6db312aff2afbfcd423498be19c02c68c (diff)
parent5ebffd5224729413e53a55ddda9a1f86224d7d73 (diff)
downloadpleroma-6875ccb6bfcc5ae62db26d38c3d5eac4c6f8706a.tar.gz
Merge branch 'develop' into feature/new-registrations-digest
Diffstat (limited to 'lib/pleroma/web/common_api/common_api.ex')
-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}