diff --git a/lib/federation/activity_pub/utils.ex b/lib/federation/activity_pub/utils.ex index 0b9a96b6b..eeb802a88 100644 --- a/lib/federation/activity_pub/utils.ex +++ b/lib/federation/activity_pub/utils.ex @@ -126,6 +126,10 @@ defmodule Mobilizon.Federation.ActivityPub.Utils do "@type" => "sc:Boolean", "@id" => "mz:isOnline" }, + "externalParticipationUrl" => %{ + "@id" => "mz:externalParticipationUrl", + "@type" => "sc:URL" + }, "PropertyValue" => "sc:PropertyValue", "value" => "sc:value", "propertyID" => "sc:propertyID", diff --git a/lib/graphql/schema/custom/timezone.ex b/lib/graphql/schema/custom/timezone.ex index cd20efc01..ad409acf4 100644 --- a/lib/graphql/schema/custom/timezone.ex +++ b/lib/graphql/schema/custom/timezone.ex @@ -17,6 +17,8 @@ defmodule Mobilizon.GraphQL.Schema.Custom.Timezone do @spec decode(Absinthe.Blueprint.Input.String.t()) :: {:ok, term} | :error @spec decode(Absinthe.Blueprint.Input.Null.t()) :: {:ok, nil} + defp decode(%Absinthe.Blueprint.Input.String{value: ""}), do: {:ok, nil} + defp decode(%Absinthe.Blueprint.Input.String{value: value}) do if Tzdata.zone_exists?(value), do: {:ok, value}, diff --git a/src/views/Group/CreateView.vue b/src/views/Group/CreateView.vue index a99b9ec7c..e411b8406 100644 --- a/src/views/Group/CreateView.vue +++ b/src/views/Group/CreateView.vue @@ -288,12 +288,16 @@ const buildVariables = computed(() => { preferredUsername: group.value.preferredUsername, name: group.value.name, summary: group.value.summary, - physicalAddress: cloneGroup.physicalAddress, visibility: group.value.visibility, openness: group.value.openness, manuallyApprovesFollowers: group.value.manuallyApprovesFollowers, }; + if (cloneGroup.physicalAddress?.id || cloneGroup.physicalAddress?.geom) { + // @ts-expect-error No type for this variable + groupBasic.physicalAddress = cloneGroup.physicalAddress; + } + if (avatarFile.value) { avatarObj = { avatar: { diff --git a/src/views/Group/GroupSettings.vue b/src/views/Group/GroupSettings.vue index b116ad145..d343b8b7b 100644 --- a/src/views/Group/GroupSettings.vue +++ b/src/views/Group/GroupSettings.vue @@ -346,7 +346,7 @@ const currentAddress = computed({ return editableGroup.value?.physicalAddress ?? null; }, set(address: IAddress | null) { - if (editableGroup.value && address) { + if (editableGroup.value && address && (address.id || address.geom)) { editableGroup.value = { ...editableGroup.value, physicalAddress: address,