Merge pull request 'misc: missing changelog entries + drop accepts_chat_messages + dedupe htmlMfm test payloads' (#943) from Oneric/akkoma:misc_chat+changelog+dedupehtmlMfmTest into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/build-arm64 Pipeline was successful
ci/woodpecker/push/build-amd64 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
Reviewed-on: #943
This commit is contained in:
commit
16d7d612ff
3 changed files with 52 additions and 47 deletions
22
CHANGELOG.md
22
CHANGELOG.md
|
@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
|
||||
## Unreleased
|
||||
|
||||
### REMOVED
|
||||
- Dropped `accepts_chat_messages` column from users table in database;
|
||||
it has been unused for almost 3 years
|
||||
|
||||
### Added
|
||||
- We mark our MFM posts as FEP-c16b compliant, and retain remote HTML representations for incoming posts marked as FEP-c16b-compliant. (Safety scrubbers are still applied)
|
||||
- Prometheus stats now exposes failed ActivityPub deliveries
|
||||
|
@ -16,6 +20,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
- timestamps of incoming HTTP signatures are now verified.
|
||||
By default up to two hour old signatures and a maximal clock skew
|
||||
of 40 min for future timestamps or explicit expiry deadlines are accepted
|
||||
- Added `short_description` field to `api/v1/instance` for Mastodon compatibility; the corresponding
|
||||
new setting `:pleroma, :instance, :short_description` is also preferred for nodeinfo use
|
||||
- Note AP objects now expose full `replies` collections and those collections can be accessed on their own;
|
||||
previously only self-replies were inlined as an anonymous collection into the Note object
|
||||
|
||||
### Fixed
|
||||
- Internal actors no longer pretend to have unresolvable follow(er|ing) collections
|
||||
|
@ -27,17 +35,29 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
- fix network-path references not being handled by media proxy
|
||||
- federation with bridgy now works
|
||||
- remote signing keys are no longer refreshed multiple times per incoming request
|
||||
- fix digest emails never being sent and clogging the job queue even if not enabled
|
||||
- `api/v1/instance`’s `uri` field now correctly shows the bare WebFinger domain
|
||||
- fixed bug leading to `content` and thw `contentMap` entry of the primary language to sometimes diverge
|
||||
- reloading emoji with a broken `pack.json` file being on disk no longer crashes the whole server
|
||||
- fixed blocked servers being able to access local objects when authorized fetch isn’t enabled
|
||||
even when the remote server identifies itselfs
|
||||
|
||||
### Changed
|
||||
- Internal and relay actors are now again represented with type "Application"
|
||||
- `cleanup_attachments` is now enabled by default
|
||||
- shared inboxes are now generally preferred over personal inboxes, cutting down on duplicate publishing churn
|
||||
- instance actors are now really of type `Service`
|
||||
- ActivityPub delivery attempts are spaced out more giving up after 3h instead of ~20min before
|
||||
- ActivityPub delivery attempts are spaced out more and increased by one
|
||||
now giving up after 24h instead of ~20min by default before
|
||||
- inboxes now fake a succcess reply on incoming Delete documents whose signing key is unknown but gone;
|
||||
this prevents older Mastodon from repeatedly trying to deliver Deletes of actors we never knew anyway
|
||||
- The config option `config :pleroma, :http, :pool_max_idle_time` was removed; it never actually
|
||||
did anything and was redundant with `config :pleroma, :http, :pool_timeout` which actually works.
|
||||
- repeated attempt to process incoming ActivityPub objects are spaced out more, allowing unreachable remotes
|
||||
more time to come back up when e.g. processing repeats of a post not yet locally known
|
||||
- `/api/v1/statuses/:id/reblog` now honours all possible visibilities except `list` and `conversation`
|
||||
instead of mapping them down to a boolean private/public
|
||||
|
||||
|
||||
## 2025.03
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
defmodule Pleroma.Repo.Migrations.DropAcceptsChatMessages do
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
alter table(:users) do
|
||||
remove(:accepts_chat_messages)
|
||||
end
|
||||
end
|
||||
|
||||
def down do
|
||||
alter table(:users) do
|
||||
add(:accepts_chat_messages, :boolean, nullable: true)
|
||||
end
|
||||
|
||||
execute("update users set accepts_chat_messages = true where local = true")
|
||||
end
|
||||
end
|
|
@ -135,8 +135,8 @@ test "successfully processes incoming AP docs with correct origin" do
|
|||
assert {:cancel, :already_present} = ObanHelpers.perform(job)
|
||||
end
|
||||
|
||||
test "properly processes objects with the htmlMfm attribute true" do
|
||||
params = %{
|
||||
defp mfm_activity(object_overrides \\ %{}) do
|
||||
%{
|
||||
"@context" => "https://www.w3.org/ns/activitystreams",
|
||||
"actor" => "http://mastodon.example.org/users/admin",
|
||||
"type" => "Create",
|
||||
|
@ -145,17 +145,20 @@ test "properly processes objects with the htmlMfm attribute true" do
|
|||
"type" => "Note",
|
||||
"content" => "<p this-should-be-scrubbed-away>this is the original content</p>",
|
||||
"source" => %{
|
||||
"content" =>
|
||||
"this source content is irrelevant because the object content should be kept",
|
||||
"content" => "this is the source content",
|
||||
"mediaType" => "text/x.misskeymarkdown"
|
||||
},
|
||||
"htmlMfm" => true,
|
||||
"id" => "http://mastodon.example.org/users/admin/objects/1",
|
||||
"attributedTo" => "http://mastodon.example.org/users/admin",
|
||||
"to" => ["https://www.w3.org/ns/activitystreams#Public"]
|
||||
},
|
||||
"to" => ["https://www.w3.org/ns/activitystreams#Public"]
|
||||
}
|
||||
|> Map.update!("object", fn obj -> Map.merge(obj, object_overrides) end)
|
||||
end
|
||||
|
||||
test "properly processes objects with the htmlMfm attribute true" do
|
||||
params = mfm_activity(%{"htmlMfm" => true})
|
||||
|
||||
{:ok, job} = Federator.incoming_ap_doc(params)
|
||||
{:ok, %Pleroma.Activity{data: %{"object" => object_ap_id}}} = ObanHelpers.perform(job)
|
||||
|
@ -165,30 +168,12 @@ test "properly processes objects with the htmlMfm attribute true" do
|
|||
|
||||
assert html_mfm == true
|
||||
refute content =~ "this-should-be-scrubbed-away"
|
||||
refute content =~ "source content is irrelevant"
|
||||
refute content =~ "this is the source content"
|
||||
assert content =~ "this is the original content"
|
||||
end
|
||||
|
||||
test "properly processes objects with the htmlMfm attribute false" do
|
||||
params = %{
|
||||
"@context" => "https://www.w3.org/ns/activitystreams",
|
||||
"actor" => "http://mastodon.example.org/users/admin",
|
||||
"type" => "Create",
|
||||
"id" => "http://mastodon.example.org/users/admin/activities/1",
|
||||
"object" => %{
|
||||
"type" => "Note",
|
||||
"content" => "<p this-should-be-scrubbed-away>this is the original content</p>",
|
||||
"source" => %{
|
||||
"content" => "<p this-should-be-scrubbed-away>$[spin the source content is used]</p>",
|
||||
"mediaType" => "text/x.misskeymarkdown"
|
||||
},
|
||||
"htmlMfm" => false,
|
||||
"id" => "http://mastodon.example.org/users/admin/objects/1",
|
||||
"attributedTo" => "http://mastodon.example.org/users/admin",
|
||||
"to" => ["https://www.w3.org/ns/activitystreams#Public"]
|
||||
},
|
||||
"to" => ["https://www.w3.org/ns/activitystreams#Public"]
|
||||
}
|
||||
params = mfm_activity(%{"htmlMfm" => false})
|
||||
|
||||
{:ok, job} = Federator.incoming_ap_doc(params)
|
||||
{:ok, %Pleroma.Activity{data: %{"object" => object_ap_id}}} = ObanHelpers.perform(job)
|
||||
|
@ -198,29 +183,12 @@ test "properly processes objects with the htmlMfm attribute false" do
|
|||
|
||||
assert html_mfm == false
|
||||
refute content =~ "this-should-be-scrubbed-away"
|
||||
assert content =~ "the source content is used"
|
||||
assert content =~ "this is the source content"
|
||||
refute content =~ "this is the original content"
|
||||
end
|
||||
|
||||
test "properly processes objects with the htmlMfm attribute not set" do
|
||||
params = %{
|
||||
"@context" => "https://www.w3.org/ns/activitystreams",
|
||||
"actor" => "http://mastodon.example.org/users/admin",
|
||||
"type" => "Create",
|
||||
"id" => "http://mastodon.example.org/users/admin/activities/1",
|
||||
"object" => %{
|
||||
"type" => "Note",
|
||||
"content" => "<p this-should-be-scrubbed-away>this is the original content</p>",
|
||||
"source" => %{
|
||||
"content" => "<p this-should-be-scrubbed-away>$[spin the source content is used]</p>",
|
||||
"mediaType" => "text/x.misskeymarkdown"
|
||||
},
|
||||
"id" => "http://mastodon.example.org/users/admin/objects/1",
|
||||
"attributedTo" => "http://mastodon.example.org/users/admin",
|
||||
"to" => ["https://www.w3.org/ns/activitystreams#Public"]
|
||||
},
|
||||
"to" => ["https://www.w3.org/ns/activitystreams#Public"]
|
||||
}
|
||||
params = mfm_activity()
|
||||
|
||||
{:ok, job} = Federator.incoming_ap_doc(params)
|
||||
{:ok, %Pleroma.Activity{data: %{"object" => object_ap_id}}} = ObanHelpers.perform(job)
|
||||
|
@ -228,9 +196,9 @@ test "properly processes objects with the htmlMfm attribute not set" do
|
|||
%Pleroma.Object{data: %{"content" => content} = data} =
|
||||
Pleroma.Object.get_by_ap_id(object_ap_id)
|
||||
|
||||
assert Map.get(data, "htmlMfm") == nil
|
||||
refute Map.has_key?(data, "htmlMfm")
|
||||
refute content =~ "this-should-be-scrubbed-away"
|
||||
assert content =~ "the source content is used"
|
||||
assert content =~ "this is the source content"
|
||||
refute content =~ "this is the original content"
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue