From c58e54d5b9182652aa201a1516d25740e12f58f8 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 27 Apr 2021 16:51:28 +0200 Subject: [PATCH] Add Group as a possible ActionLog object Signed-off-by: Thomas Citharel --- js/src/graphql/report.ts | 6 ++++++ lib/graphql/schema/actors/group.ex | 2 +- lib/graphql/schema/admin.ex | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/js/src/graphql/report.ts b/js/src/graphql/report.ts index 6ab8ebfcf..3766bc938 100644 --- a/js/src/graphql/report.ts +++ b/js/src/graphql/report.ts @@ -190,6 +190,12 @@ export const LOGS = gql` domain name } + ... on Group { + id + preferredUsername + domain + name + } ... on User { id email diff --git a/lib/graphql/schema/actors/group.ex b/lib/graphql/schema/actors/group.ex index 59d4690f1..58b1c5be9 100644 --- a/lib/graphql/schema/actors/group.ex +++ b/lib/graphql/schema/actors/group.ex @@ -29,7 +29,7 @@ defmodule Mobilizon.GraphQL.Schema.Actors.GroupType do Represents a group of actors """ object :group do - interfaces([:actor, :interactable, :activity_object]) + interfaces([:actor, :interactable, :activity_object, :action_log_object]) field(:id, :id, description: "Internal ID for this group") field(:url, :string, description: "The ActivityPub actor's URL") diff --git a/lib/graphql/schema/admin.ex b/lib/graphql/schema/admin.ex index 22689f322..ad1aaa135 100644 --- a/lib/graphql/schema/admin.ex +++ b/lib/graphql/schema/admin.ex @@ -62,6 +62,9 @@ defmodule Mobilizon.GraphQL.Schema.AdminType do %User{}, _ -> :user + %Actor{type: "Group"}, _ -> + :group + _, _ -> nil end)