fix not being able to pin polls
This commit is contained in:
parent
c27d1d65bf
commit
50f5a92021
2 changed files with 17 additions and 1 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue