From f593867d8e37a5f1b5526a2dbfc8b09fc14e41d7 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sun, 6 Nov 2022 15:09:54 +0100 Subject: [PATCH 1/3] Add GraphQL query name to other queries Signed-off-by: Thomas Citharel --- js/src/graphql/actor.ts | 2 +- js/src/graphql/followers.ts | 2 +- js/src/graphql/member.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/src/graphql/actor.ts b/js/src/graphql/actor.ts index 3a1ec38d9..af9b244cc 100644 --- a/js/src/graphql/actor.ts +++ b/js/src/graphql/actor.ts @@ -17,7 +17,7 @@ export const ACTOR_FRAGMENT = gql` `; export const FETCH_PERSON = gql` - query ($username: String!) { + query FetchPerson($username: String!) { fetchPerson(preferredUsername: $username) { ...ActorFragment suspended diff --git a/js/src/graphql/followers.ts b/js/src/graphql/followers.ts index 565fc3806..c64d208ec 100644 --- a/js/src/graphql/followers.ts +++ b/js/src/graphql/followers.ts @@ -2,7 +2,7 @@ import gql from "graphql-tag"; import { ACTOR_FRAGMENT } from "./actor"; export const GROUP_FOLLOWERS = gql` - query ( + query GroupFollowers( $name: String! $followersPage: Int $followersLimit: Int diff --git a/js/src/graphql/member.ts b/js/src/graphql/member.ts index 4dc32f923..db5ca0a15 100644 --- a/js/src/graphql/member.ts +++ b/js/src/graphql/member.ts @@ -44,7 +44,7 @@ export const REJECT_INVITATION = gql` `; export const GROUP_MEMBERS = gql` - query ( + query GroupMembers( $groupName: String! $name: String $roles: String From 994797c4759b1a2a3286773a2dc84e5964521055 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sun, 6 Nov 2022 15:14:04 +0100 Subject: [PATCH 2/3] Fix front-end analytics csp config Signed-off-by: Thomas Citharel --- lib/service/front_end_analytics/analytics.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/service/front_end_analytics/analytics.ex b/lib/service/front_end_analytics/analytics.ex index f58c6823c..dc914fccd 100644 --- a/lib/service/front_end_analytics/analytics.ex +++ b/lib/service/front_end_analytics/analytics.ex @@ -65,7 +65,7 @@ defmodule Mobilizon.Service.FrontEndAnalytics do defp merge_csp_config(config, global_config) do Keyword.merge(global_config, config, fn _key, global, config -> - "#{global} #{config}" + global ++ config end) end end From 96ba48cdb0bcf12d11002c4eaaee975814f68cb3 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sun, 6 Nov 2022 15:29:34 +0100 Subject: [PATCH 3/3] Handle error when fetching object from tombstone Signed-off-by: Thomas Citharel --- lib/federation/activity_pub/transmogrifier.ex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/federation/activity_pub/transmogrifier.ex b/lib/federation/activity_pub/transmogrifier.ex index 9efa6ccce..2e4580567 100644 --- a/lib/federation/activity_pub/transmogrifier.ex +++ b/lib/federation/activity_pub/transmogrifier.ex @@ -201,6 +201,10 @@ defmodule Mobilizon.Federation.ActivityPub.Transmogrifier do {:ok, entity} -> Actions.Delete.delete(entity, Relay.get_actor(), false) + + {:error, err} -> + Logger.warn("Error while fetching object from URL", error: inspect(err)) + :error end end