Merge remote-tracking branch 'origin/main'

This commit is contained in:
778a69cd 2023-09-05 17:41:49 +02:00
commit 71d2a50356
8 changed files with 48 additions and 20 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

@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## 3.2.0-beta.4 (2023-09-05)
### Bug Fixes
* **back:** allow any other type of actor to be suspended ([92b222b](https://framagit.org/framasoft/mobilizon/commit/92b222b091cf6248969b0206e7c052b725a1286b))
* **back:** only try to insert activities for groups ([cfc9843](https://framagit.org/framasoft/mobilizon/commit/cfc984345e90b2960077956858606395f37ef9b9))
* **front:** don't return promise if result is not finished loading for tags ([8c14ba4](https://framagit.org/framasoft/mobilizon/commit/8c14ba441c6f0fadb3c59f80ff4e3abb2e625752))
* **front:** fix getting result from interactable object in InteractView ([31b2d06](https://framagit.org/framasoft/mobilizon/commit/31b2d065a904453580731133cd3dfd545a5816fa))
## 3.2.0-beta.3 (2023-09-04)

View file

@ -1,6 +1,6 @@
{
"name": "mobilizon",
"version": "3.2.0-beta.3",
"version": "3.2.0-beta.4",
"private": true,
"scripts": {
"dev": "vite",

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

View file

@ -1,7 +1,7 @@
defmodule Mobilizon.Mixfile do
use Mix.Project
@version "3.2.0-beta.3"
@version "3.2.0-beta.4"
def project do
[