Merge branch 'fixes' into 'main'

Various fixes

See merge request framasoft/mobilizon!1447
This commit is contained in:
Thomas Citharel 2023-09-05 14:34:23 +00:00
commit f3ea98822b
5 changed files with 34 additions and 18 deletions

View File

@ -290,7 +290,7 @@ build-and-push-docker-tag:
# Packaging app for amd64
package-app:
image: mobilizon/buildpack:1.14.1-erlang-25.1.1-debian-buster
image: mobilizon/buildpack:1.15.5-erlang-26.0.2-debian-buster
stage: package
variables: &release-variables
MIX_ENV: "prod"

View File

@ -11,7 +11,12 @@ export function fetchTags(text: string): Promise<ITag[]> {
})
);
onResult(({ data }) => resolve(data.tags));
onResult((result) => {
if (result.loading) {
return;
}
return resolve(result.data.tags);
});
onError((error) => reject(error));
});

View File

@ -68,7 +68,13 @@ const { onResult, onError, loading } = useQuery<{
})
);
onResult(async ({ data: { interact } }) => {
onResult(async (result) => {
if (result.loading) return;
if (!result.data) {
errors.push(t("This URL is not supported"));
return;
}
const interact = result.data.interact;
switch (interact.__typename) {
case "Group":
await router.replace({

View File

@ -22,6 +22,10 @@ defmodule Mobilizon.Service.Activity.Participant do
event = Events.get_event!(event_id)
subject = Keyword.fetch!(options, :subject)
if is_nil(event.attributed_to_id) do
# No activity for non-group events
{:ok, nil}
else
ActivityBuilder.enqueue(:build_activity, %{
"type" => "event",
"subject" => subject,
@ -37,6 +41,7 @@ defmodule Mobilizon.Service.Activity.Participant do
"inserted_at" => DateTime.utc_now()
})
end
end
@impl Activity
def insert_activity(_, _), do: {:ok, nil}

View File

@ -103,7 +103,7 @@ defmodule Mobilizon.Service.ActorSuspension do
end)
end
defp maybe_reset_actor_id(%Multi{} = multi, %Actor{type: :Group} = _actor) do
defp maybe_reset_actor_id(%Multi{} = multi, %Actor{type: _} = _actor) do
multi
end