Fix invitations

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-10-02 16:19:15 +02:00
parent 4896036cd1
commit afb7d75307
22 changed files with 298 additions and 100 deletions

View File

@@ -107,6 +107,9 @@ defmodule Mobilizon.GraphQL.Resolvers.Member do
# Launch an async task to refresh the group profile, fetch resources, discussions, members
Refresher.fetch_group(member.parent.url, actor)
{:ok, member}
else
{:is_same_actor, false} ->
{:error, dgettext("errors", "You can't accept this invitation with this profile.")}
end
end
@@ -121,6 +124,9 @@ defmodule Mobilizon.GraphQL.Resolvers.Member do
true
) do
{:ok, member}
else
{:is_same_actor, false} ->
{:error, dgettext("errors", "You can't reject this invitation with this profile.")}
end
end