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,20 +22,25 @@ defmodule Mobilizon.Service.Activity.Participant do
event = Events.get_event!(event_id)
subject = Keyword.fetch!(options, :subject)
ActivityBuilder.enqueue(:build_activity, %{
"type" => "event",
"subject" => subject,
"subject_params" => %{
actor_name: Actor.display_name(actor),
event_title: event.title,
event_uuid: event.uuid
},
"group_id" => event.attributed_to_id,
"author_id" => actor.id,
"object_type" => "participant",
"object_id" => participant_id,
"inserted_at" => DateTime.utc_now()
})
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,
"subject_params" => %{
actor_name: Actor.display_name(actor),
event_title: event.title,
event_uuid: event.uuid
},
"group_id" => event.attributed_to_id,
"author_id" => actor.id,
"object_type" => "participant",
"object_id" => participant_id,
"inserted_at" => DateTime.utc_now()
})
end
end
@impl Activity

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