fix(api): fix allowing posting event private announcement

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2023-11-21 12:00:04 +01:00
parent 6ecfa48511
commit 18314956ca
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -378,7 +378,8 @@ defmodule Mobilizon.GraphQL.Resolvers.Participant do
with {:member, true} <- with {:member, true} <-
{:member, {:member,
current_actor_id == actor_id or Actors.is_member?(current_actor_id, actor_id)}, to_string(current_actor_id) == to_string(actor_id) or
Actors.is_member?(current_actor_id, actor_id)},
{:ok, _activity, %Conversation{} = conversation} <- Comments.create_conversation(args) do {:ok, _activity, %Conversation{} = conversation} <- Comments.create_conversation(args) do
{:ok, conversation_to_view(conversation, Actors.get_actor(actor_id))} {:ok, conversation_to_view(conversation, Actors.get_actor(actor_id))}
else else