diff --git a/CHANGELOG.md b/CHANGELOG.md index c80a0c03a..4c412ee44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ 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). +## 4.0.0-rc.1 (2023-12-04) + +* fix: prevent sending group physical address if it's empty and allow empty text for timezone ([32caebb](https://framagit.org/framasoft/mobilizon/commits/32caebb)), closes [#1357](https://framagit.org/framasoft/mobilizon/issues/1357) +* fix(activitypub): add missing externalParticipationUrl context ([8795576](https://framagit.org/framasoft/mobilizon/commits/8795576)), closes [#1376](https://framagit.org/framasoft/mobilizon/issues/1376) +* fix(backend): only send suspension notification emails when actor's suspended and not just deleted ([9e41bc1](https://framagit.org/framasoft/mobilizon/commits/9e41bc1)) +* docs(nginx): improve nginx configuration ([6c992ca](https://framagit.org/framasoft/mobilizon/commits/6c992ca)) + ## 4.0.0-beta.2 (2023-12-01) * test: fix tests using verified routes ([5fcf3d5](https://framagit.org/framasoft/mobilizon/commits/5fcf3d5)) diff --git a/lib/federation/activity_pub/utils.ex b/lib/federation/activity_pub/utils.ex index eeb802a88..51441fc05 100644 --- a/lib/federation/activity_pub/utils.ex +++ b/lib/federation/activity_pub/utils.ex @@ -165,6 +165,10 @@ defmodule Mobilizon.Federation.ActivityPub.Utils do "todos" => %{ "@id" => "mz:todos", "@type" => "@id" + }, + "status" => %{ + "@id" => "ical:status", + "@type" => "ical:status" } } ] diff --git a/lib/federation/activity_stream/converter/event.ex b/lib/federation/activity_stream/converter/event.ex index d08c61db0..2eca4e805 100644 --- a/lib/federation/activity_stream/converter/event.ex +++ b/lib/federation/activity_stream/converter/event.ex @@ -81,7 +81,11 @@ defmodule Mobilizon.Federation.ActivityStream.Converter.Event do external_participation_url: object["externalParticipationUrl"], options: options, metadata: metadata, - status: object |> Map.get("ical:status", "CONFIRMED") |> String.downcase(), + # Remove fallback in MBZ 5.x + status: + object + |> Map.get("status", Map.get(object, "ical:status", "CONFIRMED")) + |> String.downcase(), online_address: object |> Map.get("attachment", []) |> get_online_address(), phone_address: object["phoneAddress"], draft: object["draft"] == true, @@ -142,7 +146,9 @@ defmodule Mobilizon.Federation.ActivityStream.Converter.Event do "anonymousParticipationEnabled" => event.options.anonymous_participation, "attachment" => Enum.map(event.metadata, &EventMetadataConverter.metadata_to_as/1), "draft" => event.draft, + # Remove me in MBZ 5.x "ical:status" => event.status |> to_string |> String.upcase(), + "status" => event.status |> to_string |> String.upcase(), "id" => event.url, "url" => event.url, "inLanguage" => event.language, diff --git a/lib/service/actor_suspension.ex b/lib/service/actor_suspension.ex index 00062563e..6c548772a 100644 --- a/lib/service/actor_suspension.ex +++ b/lib/service/actor_suspension.ex @@ -35,13 +35,17 @@ defmodule Mobilizon.Service.ActorSuspension do delete_actor_options = Keyword.merge(@delete_actor_default_options, options) Logger.debug(inspect(delete_actor_options)) - send_suspension_notification(actor) + # Only send suspension notifications if we actually are suspending the actor + if Keyword.get(delete_actor_options, :suspension, false) do + send_suspension_notification(actor) - Logger.debug( - "Sending suspension notifications to participants from events created by this actor" - ) + Logger.debug( + "Sending suspension notifications to participants from events created by this actor" + ) + + notify_event_participants_from_suspension(actor) + end - notify_event_participants_from_suspension(actor) delete_participations(actor) multi = diff --git a/lib/service/workers/background.ex b/lib/service/workers/background.ex index 6f5175b9d..d7d62a0bc 100644 --- a/lib/service/workers/background.ex +++ b/lib/service/workers/background.ex @@ -20,7 +20,10 @@ defmodule Mobilizon.Service.Workers.Background do reserve_username when is_boolean(reserve_username) -> case Actors.get_actor(actor_id) do %Actor{} = actor -> - ActorSuspension.suspend_actor(actor, reserve_username: reserve_username) + ActorSuspension.suspend_actor(actor, + reserve_username: reserve_username, + suspension: Map.get(args, "suspension", false) + ) nil -> {:error, :actor_not_found} diff --git a/mix.exs b/mix.exs index 1ee250566..aebe02bd2 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule Mobilizon.Mixfile do use Mix.Project - @version "4.0.0-beta.2" + @version "4.0.0-rc.1" def project do [ diff --git a/package.json b/package.json index 248ccc745..8f577cd27 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mobilizon", - "version": "4.0.0-beta.2", + "version": "4.0.0-rc.1", "private": true, "scripts": { "dev": "vite", diff --git a/src/components/Account/ActorAutoComplete.vue b/src/components/Account/ActorAutoComplete.vue index 47da387aa..6e561d5a0 100644 --- a/src/components/Account/ActorAutoComplete.vue +++ b/src/components/Account/ActorAutoComplete.vue @@ -7,7 +7,7 @@ :allow-new="false" :open-on-focus="false" field="displayName" - placeholder="Add a recipient" + :placeholder="t('Add a recipient')" @typing="getActors" >