diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 27029a5a4..d639430be 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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" diff --git a/CHANGELOG.md b/CHANGELOG.md index 5157082b8..44c1e3e8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/js/package.json b/js/package.json index 0bb31ba54..a7143f2ef 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "mobilizon", - "version": "3.2.0-beta.3", + "version": "3.2.0-beta.4", "private": true, "scripts": { "dev": "vite", diff --git a/js/src/composition/apollo/tags.ts b/js/src/composition/apollo/tags.ts index 252cd1013..da9c06835 100644 --- a/js/src/composition/apollo/tags.ts +++ b/js/src/composition/apollo/tags.ts @@ -11,7 +11,12 @@ export function fetchTags(text: string): Promise { }) ); - onResult(({ data }) => resolve(data.tags)); + onResult((result) => { + if (result.loading) { + return; + } + return resolve(result.data.tags); + }); onError((error) => reject(error)); }); diff --git a/js/src/views/InteractView.vue b/js/src/views/InteractView.vue index e8be781d7..ef63cbdfc 100644 --- a/js/src/views/InteractView.vue +++ b/js/src/views/InteractView.vue @@ -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({ diff --git a/lib/service/activity/participant.ex b/lib/service/activity/participant.ex index 791e67fff..2a23bdc26 100644 --- a/lib/service/activity/participant.ex +++ b/lib/service/activity/participant.ex @@ -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 diff --git a/lib/service/actor_suspension.ex b/lib/service/actor_suspension.ex index b5531a9d3..00062563e 100644 --- a/lib/service/actor_suspension.ex +++ b/lib/service/actor_suspension.ex @@ -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 diff --git a/mix.exs b/mix.exs index 1303ca8ac..59b1c74e0 100644 --- a/mix.exs +++ b/mix.exs @@ -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 [