X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Factivity_pub%2Fobject_validators%2Farticle_note_page_validator.ex;h=d4beed78d3e5318d61c7fc3d1df2e470e1de7f31;hb=a079ec3a3cdfd42d2cbd51c7698c2c87828e5778;hp=09b68c977f2c31c50e51d1dd7c398fdbccbc0640;hpb=65e8e8fb6d02f666b2528b14f9e62b28f7379513;p=akkoma diff --git a/lib/pleroma/web/activity_pub/object_validators/article_note_page_validator.ex b/lib/pleroma/web/activity_pub/object_validators/article_note_page_validator.ex index 09b68c977..d4beed78d 100644 --- a/lib/pleroma/web/activity_pub/object_validators/article_note_page_validator.ex +++ b/lib/pleroma/web/activity_pub/object_validators/article_note_page_validator.ex @@ -104,9 +104,9 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.ArticleNotePageValidator do end end - # https://github.com/misskey-dev/misskey/pull/8787 - # Misskey has an awful tendency to drop all custom formatting when it sends remotely - # So this basically reprocesses their MFM source + # See https://akkoma.dev/FoundKeyGang/FoundKey/issues/343 + # Misskey/Foundkey drops some of the custom formatting when it sends remotely + # So this basically reprocesses the MFM source defp fix_misskey_content( %{"source" => %{"mediaType" => "text/x.misskeymarkdown", "content" => content}} = object ) @@ -121,6 +121,8 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.ArticleNotePageValidator do Map.put(object, "content", linked) end + # See https://github.com/misskey-dev/misskey/pull/8787 + # This is for compatibility with older Misskey instances defp fix_misskey_content(%{"_misskey_content" => content} = object) when is_binary(content) do mention_handler = fn nick, buffer, opts, acc -> remote_mention_resolver(object, nick, buffer, opts, acc)