From 7ebb89e92ecdf1e6d4d1a7a092e1953b732ea1f0 Mon Sep 17 00:00:00 2001 From: Alex Kirk Date: Fri, 9 Dec 2022 09:28:00 +0100 Subject: [PATCH] phpcs lint fixes --- includes/class-hashtag.php | 8 ++++---- ...notiz-blog-2022-11-14-the-at-protocol.json | 1 + ...z-blog-2022-11-14-the-at-protocol.response | 1 - ...-class-activitypub-activity-dispatcher.php | 2 +- ...-class-friends-feed-parser-activitypub.php | 20 +++++++++---------- 5 files changed, 16 insertions(+), 16 deletions(-) create mode 100644 tests/fixtures/notiz-blog-2022-11-14-the-at-protocol.json delete mode 100644 tests/fixtures/notiz-blog-2022-11-14-the-at-protocol.response diff --git a/includes/class-hashtag.php b/includes/class-hashtag.php index 2b7fa541..342320d7 100644 --- a/includes/class-hashtag.php +++ b/includes/class-hashtag.php @@ -21,15 +21,15 @@ class Hashtag { * Filter to save #tags as real WordPress tags * * @param int $id the rev-id - * @param array $data the post-data as array + * @param WP_Post $post the post * * @return */ - public static function insert_post( $id, $data ) { - if ( \preg_match_all( '/' . ACTIVITYPUB_HASHTAGS_REGEXP . '/i', $data->post_content, $match ) ) { + public static function insert_post( $id, $post ) { + if ( \preg_match_all( '/' . ACTIVITYPUB_HASHTAGS_REGEXP . '/i', $post->post_content, $match ) ) { $tags = \implode( ', ', $match[1] ); - \wp_add_post_tags( $data->post_parent, $tags ); + \wp_add_post_tags( $post->post_parent, $tags ); } return $id; diff --git a/tests/fixtures/notiz-blog-2022-11-14-the-at-protocol.json b/tests/fixtures/notiz-blog-2022-11-14-the-at-protocol.json new file mode 100644 index 00000000..8b5a942c --- /dev/null +++ b/tests/fixtures/notiz-blog-2022-11-14-the-at-protocol.json @@ -0,0 +1 @@ +{"headers":{"date":"Fri, 09 Dec 2022 08:25:15 GMT","content-type":"application\/activity+json","server":"nginx","x-xrds-location":"https:\/\/notiz.blog\/?xrds","x-yadis-location":"https:\/\/notiz.blog\/?xrds","x-pingback":"https:\/\/notiz.blog\/xmlrpc.php","link":"; rel=\"micropub_media\", ; rel=\"micropub\", ; rel=\"friends-base-url\", ; rel=\"webmention\", ; rel=\"http:\/\/webmention.org\/\", ; rel=\"https:\/\/api.w.org\/\", ; rel=\"alternate\"; type=\"application\/json\", ; rel=shortlink","cache-control":"max-age=0, public","expires":"Fri, 09 Dec 2022 08:25:15 GMT","x-xss-protection":"1; mode=block","x-content-type-options":"nosniff","strict-transport-security":"max-age=31536000","x-frame-options":"SAMEORIGIN","referrer-policy":"strict-origin-when-cross-origin","x-clacks-overhead":"GNU Terry Pratchett"},"body":"{\"@context\":[\"https:\\\/\\\/www.w3.org\\\/ns\\\/activitystreams\",\"https:\\\/\\\/w3id.org\\\/security\\\/v1\",{\"manuallyApprovesFollowers\":\"as:manuallyApprovesFollowers\",\"PropertyValue\":\"schema:PropertyValue\",\"schema\":\"http:\\\/\\\/schema.org#\",\"pt\":\"https:\\\/\\\/joinpeertube.org\\\/ns#\",\"toot\":\"http:\\\/\\\/joinmastodon.org\\\/ns#\",\"value\":\"schema:value\",\"Hashtag\":\"as:Hashtag\",\"featured\":{\"@id\":\"toot:featured\",\"@type\":\"@id\"},\"featuredTags\":{\"@id\":\"toot:featuredTags\",\"@type\":\"@id\"}}],\"id\":\"https:\\\/\\\/notiz.blog\\\/2022\\\/11\\\/14\\\/the-at-protocol\\\/\",\"type\":\"Note\",\"published\":\"2022-11-14T16:49:01Z\",\"attributedTo\":\"https:\\\/\\\/notiz.blog\\\/author\\\/matthias-pfefferle\\\/\",\"summary\":null,\"inReplyTo\":null,\"content\":\"\\u003Cp\\u003EVor zwei Jahren wollte Twitter in das \\u201eDezentrale Netzwerke\\u201c-Business einsteigen und gr\\u00fcndete eigens daf\\u00fcr das \\u003Ca href=\\u0022https:\\\/\\\/notiz.blog\\\/2019\\\/12\\\/13\\\/twitiverse\\\/\\u0022 data-type=\\u0022post\\u0022 data-id=\\u002218831\\u0022\\u003EProjekt Bluesky\\u003C\\\/a\\u003E. In den folgenden zwei Jahren wurde viel evaluiert und diskutiert, was wohl die beste L\\u00f6sung f\\u00fcr Twitter sei und wir alle \\u003Cem\\u003Efieberten\\u003C\\\/em\\u003E mit ob es nun \\u003Ca href=\\u0022https:\\\/\\\/www.w3.org\\\/TR\\\/activitypub\\\/\\u0022 data-type=\\u0022URL\\u0022 data-id=\\u0022https:\\\/\\\/www.w3.org\\\/TR\\\/activitypub\\\/\\u0022\\u003EActivityPub\\u003C\\\/a\\u003E oder doch \\u003Ca href=\\u0022https:\\\/\\\/matrix.org\\\/\\u0022 data-type=\\u0022URL\\u0022 data-id=\\u0022https:\\\/\\\/matrix.org\\\/\\u0022\\u003EMatrix\\u003C\\\/a\\u003E werden w\\u00fcrde\\u2026 \\u003C\\\/p\\u003E\\u003Cp\\u003EAber das Warten hat ein Ende! \\u003Ca href=\\u0022https:\\\/\\\/blueskyweb.xyz\\\/blog\\\/10-18-2022-the-at-protocol\\u0022 data-type=\\u0022URL\\u0022 data-id=\\u0022https:\\\/\\\/blueskyweb.xyz\\\/blog\\\/10-18-2022-the-at-protocol\\u0022\\u003EBluesky hat verk\\u00fcndet wie es weiter geht\\u003C\\\/a\\u003E!\\u003C\\\/p\\u003E\\u003Cp\\u003E\\u003Cstrong\\u003ESie entwickeln ein neues Protokoll!\\u003C\\\/strong\\u003E\\u003C\\\/p\\u003E\\u003Cp\\u003EDas \\u003Cem\\u003EAT Protocol\\u003C\\\/em\\u003E, kurz f\\u00fcr \\u003Cem\\u003EAuthenticated Transfer Protocol\\u003C\\\/em\\u003E!\\u003C\\\/p\\u003E\\u003Cp\\u003EIch hab mir die \\u003Ca href=\\u0022https:\\\/\\\/atproto.com\\\/guides\\\/faq\\u0022 data-type=\\u0022URL\\u0022 data-id=\\u0022https:\\\/\\\/atproto.com\\\/guides\\\/faq\\u0022\\u003EFAQ\\u003C\\\/a\\u003E mal angeschaut und dort steht warum Bluesky sich gegen ActivityPub entschieden hat:\\u003C\\\/p\\u003E\\u003Cblockquote class=\\u0022wp-block-quote\\u0022\\u003E\\n\\u003Cp\\u003EAccount portability is the major reason why we chose to build a separate protocol. We consider portability to be crucial because it protects users from sudden bans, server shutdowns, and policy disagreements. Our solution for portability requires both \\u003Ca href=\\u0022https:\\\/\\\/atproto.com\\\/guides\\\/data-repos\\u0022\\u003Esigned data repositories\\u003C\\\/a\\u003E and \\u003Ca href=\\u0022https:\\\/\\\/atproto.com\\\/guides\\\/identity\\u0022\\u003EDIDs\\u003C\\\/a\\u003E, neither of which are easy to retrofit into ActivityPub. The migration tools for ActivityPub are comparatively limited; they require the original server to provide a redirect and cannot migrate the user\\u2019s previous data.\\u003C\\\/p\\u003E\\n\\u003C\\\/blockquote\\u003E\\u003Cp\\u003EDas erinnert mich ein bisschen an die Subline von meinem \\u003Ca href=\\u0022https:\\\/\\\/pfefferle.dev\\\/openwebicons\\\/\\u0022 data-type=\\u0022URL\\u0022 data-id=\\u0022https:\\\/\\\/pfefferle.dev\\\/openwebicons\\\/\\u0022\\u003EOpenWeb-Icons Font\\u003C\\\/a\\u003E:\\u003C\\\/p\\u003E\\u003Cblockquote class=\\u0022wp-block-quote\\u0022\\u003E\\n\\u003Cp\\u003EWhy \\u003Cem\\u003EOpenWeb Icons\\u003C\\\/em\\u003E? Because \\u003Ca href=\\u0022https:\\\/\\\/fortawesome.com\\\/\\u0022 data-type=\\u0022URL\\u0022 data-id=\\u0022https:\\\/\\\/fortawesome.com\\\/\\u0022\\u003EFont Awesome\\u003C\\\/a\\u003E had no RSS-icon [\\u2026]\\u003C\\\/p\\u003E\\n\\u003C\\\/blockquote\\u003E\\u003Cp\\u003E\\u003Cstrong\\u003EWeil ActivityPub keine perfekte L\\u00f6sung f\\u00fcr \\u201eAccount portability\\u201c hat, bauen sie ein komplett neues Protokoll?\\u003C\\\/strong\\u003E\\u003C\\\/p\\u003E\\u003Cp\\u003EActivityPub ist sicherlich nicht \\u201efeature complete\\u201c, aber ein guter erster Wurf, was das Fediverse erfolgreich bewiesen hat! Warum arbeitet Twitter also lieber an einem eigen Format anstatt mit dem W3C zusammen an ActivityPub v2?\\u003C\\\/p\\u003E\\u003Cp\\u003EWarum macht sich das W3C \\u00fcberhaupt noch die M\\u00fche \\u201eStandards\\u201c zu definieren?\\u003C\\\/p\\u003E\\u003Cp\\u003E\\u003Cstrong\\u003EWegen der Interoperabilit\\u00e4t!\\u003C\\\/strong\\u003E\\u003C\\\/p\\u003E\\u003Cp\\u003EW\\u00fcrde Twitter mit HTTP(S), HTML oder CSS \\u00e4hnlich umgehen, w\\u00fcrde der Browser einfach leer bleiben, weil das \\u0026$%\\u00a7\\u0026 Internet nur mit einheitlichen Standards funktioniert!\\u003C\\\/p\\u003E\\u003Cp\\u003EUnd das gleiche gilt auch f\\u00fcr dezentralte Netze, zumindest wenn sie erfolgreich sein wollen! Dar\\u00fcber hab ich tragischerweise schon vor \\u003Cstrong\\u003E10 Jahren\\u003C\\\/strong\\u003E geschrieben!\\u003C\\\/p\\u003E\\u003Cblockquote class=\\u0022wp-block-quote\\u0022\\u003E\\n\\u003Cp\\u003EDiaspora* wurde kaum \\u003Ca href=\\u0022https:\\\/\\\/web.archive.org\\\/web\\\/20130630113539\\\/http:\\\/\\\/blog.diasporafoundation.org\\\/2012\\\/08\\\/27\\\/announcement-diaspora-will-now-be-a-community-project.html\\u0022\\u003Ef\\u00fcr \\u201etot\\u201c erkl\\u00e4rt\\u003C\\\/a\\u003E und schon steht das n\\u00e4chste Projekt in den Startl\\u00f6chern! \\u003Ca href=\\u0022https:\\\/\\\/web.archive.org\\\/web\\\/20190603031810\\\/https:\\\/\\\/tent.io\\\/\\u0022\\u003ETent.io\\u003C\\\/a\\u003E soll ein protocol for distributed social networking and personal data storage werden. Alles neu, alles anders, alles besser als OStatus, DiSo oder Diaspora*. Aber mal ganz ehrlich\\u2026 was haben die Diasporas \\u0026 Co. bisher geschaffen? Ziel war es Facebooks \\u201eWalled Gardens\\u201c aufzubrechen und was kam wirklich dabei rum? Eine ganze Reihe an dezentralen \\u201eWalled Gardens\\u201c. Na danke!\\u003C\\\/p\\u003E\\n\\u003Ccite\\u003E\\u003Ca href=\\u0022https:\\\/\\\/notiz.blog\\\/2012\\\/11\\\/15\\\/dezentrale-walled-gardens\\\/\\u0022\\u003EDezentrale \\u201eWalled Gardens\\u201c\\u003C\\\/a\\u003E\\u003C\\\/cite\\u003E\\u003C\\\/blockquote\\u003E\\u003Cp\\u003EDas \\u003Ca href=\\u0022https:\\\/\\\/the-federation.info\\\/\\u0022 data-type=\\u0022URL\\u0022 data-id=\\u0022https:\\\/\\\/the-federation.info\\\/\\u0022\\u003Efediverse\\u003C\\\/a\\u003E hat (wie schon erw\\u00e4hnt) bisher einen gro\\u00dfartigen Job gemacht und verschiedenste Netzwerke mit den verschiedensten Auspr\\u00e4gungen vernetzt! Ich \\u003Cs\\u003Eglaube\\u003C\\\/s\\u003E bin der festen \\u00dcberzeugung, dass sich diesmal wirklich das offene Format (\\u003Cem\\u003EActivityPub\\u003C\\\/em\\u003E) durchsetzen wird und Blueskys \\u003Cem\\u003EAuthenticated Transfer Protocol\\u003C\\\/em\\u003E auch in ein paar Monaten oder Jahren keine Rolle spielen wird! \\u003C\\\/p\\u003E\\u003Cp\\u003E\\u003Ca href=\\u0022https:\\\/\\\/twitter.com\\\/benwerd\\u0022 data-type=\\u0022URL\\u0022 data-id=\\u0022https:\\\/\\\/twitter.com\\\/benwerd\\u0022\\u003EBen Werdmuller\\u003C\\\/a\\u003E hat eine gesunde Einstellung zu dem Thema:\\u003C\\\/p\\u003E\\u003Cblockquote class=\\u0022wp-block-quote\\u0022\\u003E\\n\\u003Cp\\u003EI\\u2019m so burned out by open source social, but I\\u2019m glad to see people throw energy at the problem, even if it\\u2019s not how I would have gone about it.\\u003C\\\/p\\u003E\\n\\u003Ccite\\u003E\\u003Ca href=\\u0022https:\\\/\\\/twitter.com\\\/benwerd\\\/status\\\/1582554417693270016\\u0022 data-type=\\u0022URL\\u0022 data-id=\\u0022https:\\\/\\\/twitter.com\\\/benwerd\\\/status\\\/1582554417693270016\\u0022\\u003ETwitter\\u003C\\\/a\\u003E\\u003C\\\/cite\\u003E\\u003C\\\/blockquote\\u003E\\u003Cp\\u003EMehr hab ich dazu eigentlich nicht zu sagen, au\\u00dfer dass wir in der \\u003Ca href=\\u0022https:\\\/\\\/neunetz.fm\\\/neunetzcast-93-was-wir-unter-dezentralitaet-verstehen-und-was-wir-uns-davon-erhoffen\\\/\\u0022 data-type=\\u0022URL\\u0022 data-id=\\u0022https:\\\/\\\/neunetz.fm\\\/neunetzcast-93-was-wir-unter-dezentralitaet-verstehen-und-was-wir-uns-davon-erhoffen\\\/\\u0022\\u003Eaktuellen Folge\\u003C\\\/a\\u003E des neunetzcasts sehr ausgiebig \\u00fcber genau dieses Problem gesprochen haben!\\u003C\\\/p\\u003E\\u003Cp\\u003E\\u003Ca rel=\\u0022tag\\u0022 class=\\u0022u-tag u-category\\u0022 href=\\u0022https:\\\/\\\/notiz.blog\\\/tag\\\/activitypub\\\/\\u0022\\u003E#activitypub\\u003C\\\/a\\u003E \\u003Ca rel=\\u0022tag\\u0022 class=\\u0022u-tag u-category\\u0022 href=\\u0022https:\\\/\\\/notiz.blog\\\/tag\\\/bluesky\\\/\\u0022\\u003E#bluesky\\u003C\\\/a\\u003E \\u003Ca rel=\\u0022tag\\u0022 class=\\u0022u-tag u-category\\u0022 href=\\u0022https:\\\/\\\/notiz.blog\\\/tag\\\/fediverse\\\/\\u0022\\u003E#fediverse\\u003C\\\/a\\u003E \\u003Ca rel=\\u0022tag\\u0022 class=\\u0022u-tag u-category\\u0022 href=\\u0022https:\\\/\\\/notiz.blog\\\/tag\\\/matrix\\\/\\u0022\\u003E#matrix\\u003C\\\/a\\u003E \\u003Ca rel=\\u0022tag\\u0022 class=\\u0022u-tag u-category\\u0022 href=\\u0022https:\\\/\\\/notiz.blog\\\/tag\\\/twitter\\\/\\u0022\\u003E#twitter\\u003C\\\/a\\u003E\\u003C\\\/p\\u003E\\u003Cp\\u003E\\u003Ca href=\\u0022https:\\\/\\\/notiz.blog\\\/2022\\\/11\\\/14\\\/the-at-protocol\\\/\\u0022\\u003Ehttps:\\\/\\\/notiz.blog\\\/2022\\\/11\\\/14\\\/the-at-protocol\\\/\\u003C\\\/a\\u003E\\u003C\\\/p\\u003E\",\"contentMap\":{\"de\":\"\\u003Cp\\u003EVor zwei Jahren wollte Twitter in das \\u201eDezentrale Netzwerke\\u201c-Business einsteigen und gr\\u00fcndete eigens daf\\u00fcr das \\u003Ca href=\\u0022https:\\\/\\\/notiz.blog\\\/2019\\\/12\\\/13\\\/twitiverse\\\/\\u0022 data-type=\\u0022post\\u0022 data-id=\\u002218831\\u0022\\u003EProjekt Bluesky\\u003C\\\/a\\u003E. In den folgenden zwei Jahren wurde viel evaluiert und diskutiert, was wohl die beste L\\u00f6sung f\\u00fcr Twitter sei und wir alle \\u003Cem\\u003Efieberten\\u003C\\\/em\\u003E mit ob es nun \\u003Ca href=\\u0022https:\\\/\\\/www.w3.org\\\/TR\\\/activitypub\\\/\\u0022 data-type=\\u0022URL\\u0022 data-id=\\u0022https:\\\/\\\/www.w3.org\\\/TR\\\/activitypub\\\/\\u0022\\u003EActivityPub\\u003C\\\/a\\u003E oder doch \\u003Ca href=\\u0022https:\\\/\\\/matrix.org\\\/\\u0022 data-type=\\u0022URL\\u0022 data-id=\\u0022https:\\\/\\\/matrix.org\\\/\\u0022\\u003EMatrix\\u003C\\\/a\\u003E werden w\\u00fcrde\\u2026 \\u003C\\\/p\\u003E\\u003Cp\\u003EAber das Warten hat ein Ende! \\u003Ca href=\\u0022https:\\\/\\\/blueskyweb.xyz\\\/blog\\\/10-18-2022-the-at-protocol\\u0022 data-type=\\u0022URL\\u0022 data-id=\\u0022https:\\\/\\\/blueskyweb.xyz\\\/blog\\\/10-18-2022-the-at-protocol\\u0022\\u003EBluesky hat verk\\u00fcndet wie es weiter geht\\u003C\\\/a\\u003E!\\u003C\\\/p\\u003E\\u003Cp\\u003E\\u003Cstrong\\u003ESie entwickeln ein neues Protokoll!\\u003C\\\/strong\\u003E\\u003C\\\/p\\u003E\\u003Cp\\u003EDas \\u003Cem\\u003EAT Protocol\\u003C\\\/em\\u003E, kurz f\\u00fcr \\u003Cem\\u003EAuthenticated Transfer Protocol\\u003C\\\/em\\u003E!\\u003C\\\/p\\u003E\\u003Cp\\u003EIch hab mir die \\u003Ca href=\\u0022https:\\\/\\\/atproto.com\\\/guides\\\/faq\\u0022 data-type=\\u0022URL\\u0022 data-id=\\u0022https:\\\/\\\/atproto.com\\\/guides\\\/faq\\u0022\\u003EFAQ\\u003C\\\/a\\u003E mal angeschaut und dort steht warum Bluesky sich gegen ActivityPub entschieden hat:\\u003C\\\/p\\u003E\\u003Cblockquote class=\\u0022wp-block-quote\\u0022\\u003E\\n\\u003Cp\\u003EAccount portability is the major reason why we chose to build a separate protocol. We consider portability to be crucial because it protects users from sudden bans, server shutdowns, and policy disagreements. Our solution for portability requires both \\u003Ca href=\\u0022https:\\\/\\\/atproto.com\\\/guides\\\/data-repos\\u0022\\u003Esigned data repositories\\u003C\\\/a\\u003E and \\u003Ca href=\\u0022https:\\\/\\\/atproto.com\\\/guides\\\/identity\\u0022\\u003EDIDs\\u003C\\\/a\\u003E, neither of which are easy to retrofit into ActivityPub. The migration tools for ActivityPub are comparatively limited; they require the original server to provide a redirect and cannot migrate the user\\u2019s previous data.\\u003C\\\/p\\u003E\\n\\u003C\\\/blockquote\\u003E\\u003Cp\\u003EDas erinnert mich ein bisschen an die Subline von meinem \\u003Ca href=\\u0022https:\\\/\\\/pfefferle.dev\\\/openwebicons\\\/\\u0022 data-type=\\u0022URL\\u0022 data-id=\\u0022https:\\\/\\\/pfefferle.dev\\\/openwebicons\\\/\\u0022\\u003EOpenWeb-Icons Font\\u003C\\\/a\\u003E:\\u003C\\\/p\\u003E\\u003Cblockquote class=\\u0022wp-block-quote\\u0022\\u003E\\n\\u003Cp\\u003EWhy \\u003Cem\\u003EOpenWeb Icons\\u003C\\\/em\\u003E? Because \\u003Ca href=\\u0022https:\\\/\\\/fortawesome.com\\\/\\u0022 data-type=\\u0022URL\\u0022 data-id=\\u0022https:\\\/\\\/fortawesome.com\\\/\\u0022\\u003EFont Awesome\\u003C\\\/a\\u003E had no RSS-icon [\\u2026]\\u003C\\\/p\\u003E\\n\\u003C\\\/blockquote\\u003E\\u003Cp\\u003E\\u003Cstrong\\u003EWeil ActivityPub keine perfekte L\\u00f6sung f\\u00fcr \\u201eAccount portability\\u201c hat, bauen sie ein komplett neues Protokoll?\\u003C\\\/strong\\u003E\\u003C\\\/p\\u003E\\u003Cp\\u003EActivityPub ist sicherlich nicht \\u201efeature complete\\u201c, aber ein guter erster Wurf, was das Fediverse erfolgreich bewiesen hat! Warum arbeitet Twitter also lieber an einem eigen Format anstatt mit dem W3C zusammen an ActivityPub v2?\\u003C\\\/p\\u003E\\u003Cp\\u003EWarum macht sich das W3C \\u00fcberhaupt noch die M\\u00fche \\u201eStandards\\u201c zu definieren?\\u003C\\\/p\\u003E\\u003Cp\\u003E\\u003Cstrong\\u003EWegen der Interoperabilit\\u00e4t!\\u003C\\\/strong\\u003E\\u003C\\\/p\\u003E\\u003Cp\\u003EW\\u00fcrde Twitter mit HTTP(S), HTML oder CSS \\u00e4hnlich umgehen, w\\u00fcrde der Browser einfach leer bleiben, weil das \\u0026$%\\u00a7\\u0026 Internet nur mit einheitlichen Standards funktioniert!\\u003C\\\/p\\u003E\\u003Cp\\u003EUnd das gleiche gilt auch f\\u00fcr dezentralte Netze, zumindest wenn sie erfolgreich sein wollen! Dar\\u00fcber hab ich tragischerweise schon vor \\u003Cstrong\\u003E10 Jahren\\u003C\\\/strong\\u003E geschrieben!\\u003C\\\/p\\u003E\\u003Cblockquote class=\\u0022wp-block-quote\\u0022\\u003E\\n\\u003Cp\\u003EDiaspora* wurde kaum \\u003Ca href=\\u0022https:\\\/\\\/web.archive.org\\\/web\\\/20130630113539\\\/http:\\\/\\\/blog.diasporafoundation.org\\\/2012\\\/08\\\/27\\\/announcement-diaspora-will-now-be-a-community-project.html\\u0022\\u003Ef\\u00fcr \\u201etot\\u201c erkl\\u00e4rt\\u003C\\\/a\\u003E und schon steht das n\\u00e4chste Projekt in den Startl\\u00f6chern! \\u003Ca href=\\u0022https:\\\/\\\/web.archive.org\\\/web\\\/20190603031810\\\/https:\\\/\\\/tent.io\\\/\\u0022\\u003ETent.io\\u003C\\\/a\\u003E soll ein protocol for distributed social networking and personal data storage werden. Alles neu, alles anders, alles besser als OStatus, DiSo oder Diaspora*. Aber mal ganz ehrlich\\u2026 was haben die Diasporas \\u0026 Co. bisher geschaffen? Ziel war es Facebooks \\u201eWalled Gardens\\u201c aufzubrechen und was kam wirklich dabei rum? Eine ganze Reihe an dezentralen \\u201eWalled Gardens\\u201c. Na danke!\\u003C\\\/p\\u003E\\n\\u003Ccite\\u003E\\u003Ca href=\\u0022https:\\\/\\\/notiz.blog\\\/2012\\\/11\\\/15\\\/dezentrale-walled-gardens\\\/\\u0022\\u003EDezentrale \\u201eWalled Gardens\\u201c\\u003C\\\/a\\u003E\\u003C\\\/cite\\u003E\\u003C\\\/blockquote\\u003E\\u003Cp\\u003EDas \\u003Ca href=\\u0022https:\\\/\\\/the-federation.info\\\/\\u0022 data-type=\\u0022URL\\u0022 data-id=\\u0022https:\\\/\\\/the-federation.info\\\/\\u0022\\u003Efediverse\\u003C\\\/a\\u003E hat (wie schon erw\\u00e4hnt) bisher einen gro\\u00dfartigen Job gemacht und verschiedenste Netzwerke mit den verschiedensten Auspr\\u00e4gungen vernetzt! Ich \\u003Cs\\u003Eglaube\\u003C\\\/s\\u003E bin der festen \\u00dcberzeugung, dass sich diesmal wirklich das offene Format (\\u003Cem\\u003EActivityPub\\u003C\\\/em\\u003E) durchsetzen wird und Blueskys \\u003Cem\\u003EAuthenticated Transfer Protocol\\u003C\\\/em\\u003E auch in ein paar Monaten oder Jahren keine Rolle spielen wird! \\u003C\\\/p\\u003E\\u003Cp\\u003E\\u003Ca href=\\u0022https:\\\/\\\/twitter.com\\\/benwerd\\u0022 data-type=\\u0022URL\\u0022 data-id=\\u0022https:\\\/\\\/twitter.com\\\/benwerd\\u0022\\u003EBen Werdmuller\\u003C\\\/a\\u003E hat eine gesunde Einstellung zu dem Thema:\\u003C\\\/p\\u003E\\u003Cblockquote class=\\u0022wp-block-quote\\u0022\\u003E\\n\\u003Cp\\u003EI\\u2019m so burned out by open source social, but I\\u2019m glad to see people throw energy at the problem, even if it\\u2019s not how I would have gone about it.\\u003C\\\/p\\u003E\\n\\u003Ccite\\u003E\\u003Ca href=\\u0022https:\\\/\\\/twitter.com\\\/benwerd\\\/status\\\/1582554417693270016\\u0022 data-type=\\u0022URL\\u0022 data-id=\\u0022https:\\\/\\\/twitter.com\\\/benwerd\\\/status\\\/1582554417693270016\\u0022\\u003ETwitter\\u003C\\\/a\\u003E\\u003C\\\/cite\\u003E\\u003C\\\/blockquote\\u003E\\u003Cp\\u003EMehr hab ich dazu eigentlich nicht zu sagen, au\\u00dfer dass wir in der \\u003Ca href=\\u0022https:\\\/\\\/neunetz.fm\\\/neunetzcast-93-was-wir-unter-dezentralitaet-verstehen-und-was-wir-uns-davon-erhoffen\\\/\\u0022 data-type=\\u0022URL\\u0022 data-id=\\u0022https:\\\/\\\/neunetz.fm\\\/neunetzcast-93-was-wir-unter-dezentralitaet-verstehen-und-was-wir-uns-davon-erhoffen\\\/\\u0022\\u003Eaktuellen Folge\\u003C\\\/a\\u003E des neunetzcasts sehr ausgiebig \\u00fcber genau dieses Problem gesprochen haben!\\u003C\\\/p\\u003E\\u003Cp\\u003E\\u003Ca rel=\\u0022tag\\u0022 class=\\u0022u-tag u-category\\u0022 href=\\u0022https:\\\/\\\/notiz.blog\\\/tag\\\/activitypub\\\/\\u0022\\u003E#activitypub\\u003C\\\/a\\u003E \\u003Ca rel=\\u0022tag\\u0022 class=\\u0022u-tag u-category\\u0022 href=\\u0022https:\\\/\\\/notiz.blog\\\/tag\\\/bluesky\\\/\\u0022\\u003E#bluesky\\u003C\\\/a\\u003E \\u003Ca rel=\\u0022tag\\u0022 class=\\u0022u-tag u-category\\u0022 href=\\u0022https:\\\/\\\/notiz.blog\\\/tag\\\/fediverse\\\/\\u0022\\u003E#fediverse\\u003C\\\/a\\u003E \\u003Ca rel=\\u0022tag\\u0022 class=\\u0022u-tag u-category\\u0022 href=\\u0022https:\\\/\\\/notiz.blog\\\/tag\\\/matrix\\\/\\u0022\\u003E#matrix\\u003C\\\/a\\u003E \\u003Ca rel=\\u0022tag\\u0022 class=\\u0022u-tag u-category\\u0022 href=\\u0022https:\\\/\\\/notiz.blog\\\/tag\\\/twitter\\\/\\u0022\\u003E#twitter\\u003C\\\/a\\u003E\\u003C\\\/p\\u003E\\u003Cp\\u003E\\u003Ca href=\\u0022https:\\\/\\\/notiz.blog\\\/2022\\\/11\\\/14\\\/the-at-protocol\\\/\\u0022\\u003Ehttps:\\\/\\\/notiz.blog\\\/2022\\\/11\\\/14\\\/the-at-protocol\\\/\\u003C\\\/a\\u003E\\u003C\\\/p\\u003E\"},\"to\":[\"https:\\\/\\\/www.w3.org\\\/ns\\\/activitystreams#Public\"],\"cc\":[\"https:\\\/\\\/www.w3.org\\\/ns\\\/activitystreams#Public\"],\"attachment\":[{\"type\":\"Image\",\"url\":\"https:\\\/\\\/notiz.blog\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/the-at-protocol.png\",\"mediaType\":\"image\\\/png\",\"name\":\"The Logo of the AT Protocol\"}],\"tag\":[{\"type\":\"Hashtag\",\"href\":\"https:\\\/\\\/notiz.blog\\\/tag\\\/activitypub\\\/\",\"name\":\"#activitypub\"},{\"type\":\"Hashtag\",\"href\":\"https:\\\/\\\/notiz.blog\\\/tag\\\/bluesky\\\/\",\"name\":\"#bluesky\"},{\"type\":\"Hashtag\",\"href\":\"https:\\\/\\\/notiz.blog\\\/tag\\\/fediverse\\\/\",\"name\":\"#fediverse\"},{\"type\":\"Hashtag\",\"href\":\"https:\\\/\\\/notiz.blog\\\/tag\\\/matrix\\\/\",\"name\":\"#matrix\"},{\"type\":\"Hashtag\",\"href\":\"https:\\\/\\\/notiz.blog\\\/tag\\\/twitter\\\/\",\"name\":\"#twitter\"}]}","response":{"code":200}} \ No newline at end of file diff --git a/tests/fixtures/notiz-blog-2022-11-14-the-at-protocol.response b/tests/fixtures/notiz-blog-2022-11-14-the-at-protocol.response deleted file mode 100644 index d6705a15..00000000 --- a/tests/fixtures/notiz-blog-2022-11-14-the-at-protocol.response +++ /dev/null @@ -1 +0,0 @@ -a:3:{s:7:"headers";a:15:{s:4:"date";s:29:"Fri, 02 Dec 2022 12:09:11 GMT";s:12:"content-type";s:25:"application/activity+json";s:6:"server";s:5:"nginx";s:15:"x-xrds-location";s:24:"https://notiz.blog/?xrds";s:16:"x-yadis-location";s:24:"https://notiz.blog/?xrds";s:10:"x-pingback";s:29:"https://notiz.blog/xmlrpc.php";s:4:"link";s:541:"; rel="micropub_media", ; rel="micropub", ; rel="friends-base-url", ; rel="webmention", ; rel="http://webmention.org/", ; rel="https://api.w.org/", ; rel="alternate"; type="application/json", ; rel=shortlink";s:13:"cache-control";s:17:"max-age=0, public";s:7:"expires";s:29:"Fri, 02 Dec 2022 12:09:11 GMT";s:16:"x-xss-protection";s:13:"1; mode=block";s:22:"x-content-type-options";s:7:"nosniff";s:25:"strict-transport-security";s:16:"max-age=31536000";s:15:"x-frame-options";s:10:"SAMEORIGIN";s:15:"referrer-policy";s:31:"strict-origin-when-cross-origin";s:17:"x-clacks-overhead";s:19:"GNU Terry Pratchett";}s:4:"body";s:18048:"{"@context":["https:\/\/www.w3.org\/ns\/activitystreams","https:\/\/w3id.org\/security\/v1",{"manuallyApprovesFollowers":"as:manuallyApprovesFollowers","PropertyValue":"schema:PropertyValue","schema":"http:\/\/schema.org#","pt":"https:\/\/joinpeertube.org\/ns#","toot":"http:\/\/joinmastodon.org\/ns#","value":"schema:value","Hashtag":"as:Hashtag","featured":{"@id":"toot:featured","@type":"@id"},"featuredTags":{"@id":"toot:featuredTags","@type":"@id"}}],"id":"https:\/\/notiz.blog\/2022\/11\/14\/the-at-protocol\/","type":"Note","published":"2022-11-14T16:49:01Z","attributedTo":"https:\/\/notiz.blog\/author\/matthias-pfefferle\/","summary":null,"inReplyTo":null,"content":"\u003Cp\u003EVor zwei Jahren wollte Twitter in das \u201eDezentrale Netzwerke\u201c-Business einsteigen und gr\u00fcndete eigens daf\u00fcr das \u003Ca href=\u0022https:\/\/notiz.blog\/2019\/12\/13\/twitiverse\/\u0022 data-type=\u0022post\u0022 data-id=\u002218831\u0022\u003EProjekt Bluesky\u003C\/a\u003E. In den folgenden zwei Jahren wurde viel evaluiert und diskutiert, was wohl die beste L\u00f6sung f\u00fcr Twitter sei und wir alle \u003Cem\u003Efieberten\u003C\/em\u003E mit ob es nun \u003Ca href=\u0022https:\/\/www.w3.org\/TR\/activitypub\/\u0022 data-type=\u0022URL\u0022 data-id=\u0022https:\/\/www.w3.org\/TR\/activitypub\/\u0022\u003EActivityPub\u003C\/a\u003E oder doch \u003Ca href=\u0022https:\/\/matrix.org\/\u0022 data-type=\u0022URL\u0022 data-id=\u0022https:\/\/matrix.org\/\u0022\u003EMatrix\u003C\/a\u003E werden w\u00fcrde\u2026 \u003C\/p\u003E\u003Cp\u003EAber das Warten hat ein Ende! \u003Ca href=\u0022https:\/\/blueskyweb.xyz\/blog\/10-18-2022-the-at-protocol\u0022 data-type=\u0022URL\u0022 data-id=\u0022https:\/\/blueskyweb.xyz\/blog\/10-18-2022-the-at-protocol\u0022\u003EBluesky hat verk\u00fcndet wie es weiter geht\u003C\/a\u003E!\u003C\/p\u003E\u003Cp\u003E\u003Cstrong\u003ESie entwickeln ein neues Protokoll!\u003C\/strong\u003E\u003C\/p\u003E\u003Cp\u003EDas \u003Cem\u003EAT Protocol\u003C\/em\u003E, kurz f\u00fcr \u003Cem\u003EAuthenticated Transfer Protocol\u003C\/em\u003E!\u003C\/p\u003E\u003Cp\u003EIch hab mir die \u003Ca href=\u0022https:\/\/atproto.com\/guides\/faq\u0022 data-type=\u0022URL\u0022 data-id=\u0022https:\/\/atproto.com\/guides\/faq\u0022\u003EFAQ\u003C\/a\u003E mal angeschaut und dort steht warum Bluesky sich gegen ActivityPub entschieden hat:\u003C\/p\u003E\u003Cblockquote class=\u0022wp-block-quote\u0022\u003E\n\u003Cp\u003EAccount portability is the major reason why we chose to build a separate protocol. We consider portability to be crucial because it protects users from sudden bans, server shutdowns, and policy disagreements. Our solution for portability requires both \u003Ca href=\u0022https:\/\/atproto.com\/guides\/data-repos\u0022\u003Esigned data repositories\u003C\/a\u003E and \u003Ca href=\u0022https:\/\/atproto.com\/guides\/identity\u0022\u003EDIDs\u003C\/a\u003E, neither of which are easy to retrofit into ActivityPub. The migration tools for ActivityPub are comparatively limited; they require the original server to provide a redirect and cannot migrate the user\u2019s previous data.\u003C\/p\u003E\n\u003C\/blockquote\u003E\u003Cp\u003EDas erinnert mich ein bisschen an die Subline von meinem \u003Ca href=\u0022https:\/\/pfefferle.dev\/openwebicons\/\u0022 data-type=\u0022URL\u0022 data-id=\u0022https:\/\/pfefferle.dev\/openwebicons\/\u0022\u003EOpenWeb-Icons Font\u003C\/a\u003E:\u003C\/p\u003E\u003Cblockquote class=\u0022wp-block-quote\u0022\u003E\n\u003Cp\u003EWhy \u003Cem\u003EOpenWeb Icons\u003C\/em\u003E? Because \u003Ca href=\u0022https:\/\/fortawesome.com\/\u0022 data-type=\u0022URL\u0022 data-id=\u0022https:\/\/fortawesome.com\/\u0022\u003EFont Awesome\u003C\/a\u003E had no RSS-icon [\u2026]\u003C\/p\u003E\n\u003C\/blockquote\u003E\u003Cp\u003E\u003Cstrong\u003EWeil ActivityPub keine perfekte L\u00f6sung f\u00fcr \u201eAccount portability\u201c hat, bauen sie ein komplett neues Protokoll?\u003C\/strong\u003E\u003C\/p\u003E\u003Cp\u003EActivityPub ist sicherlich nicht \u201efeature complete\u201c, aber ein guter erster Wurf, was das Fediverse erfolgreich bewiesen hat! Warum arbeitet Twitter also lieber an einem eigen Format anstatt mit dem W3C zusammen an ActivityPub v2?\u003C\/p\u003E\u003Cp\u003EWarum macht sich das W3C \u00fcberhaupt noch die M\u00fche \u201eStandards\u201c zu definieren?\u003C\/p\u003E\u003Cp\u003E\u003Cstrong\u003EWegen der Interoperabilit\u00e4t!\u003C\/strong\u003E\u003C\/p\u003E\u003Cp\u003EW\u00fcrde Twitter mit HTTP(S), HTML oder CSS \u00e4hnlich umgehen, w\u00fcrde der Browser einfach leer bleiben, weil das \u0026$%\u00a7\u0026 Internet nur mit einheitlichen Standards funktioniert!\u003C\/p\u003E\u003Cp\u003EUnd das gleiche gilt auch f\u00fcr dezentralte Netze, zumindest wenn sie erfolgreich sein wollen! Dar\u00fcber hab ich tragischerweise schon vor \u003Cstrong\u003E10 Jahren\u003C\/strong\u003E geschrieben!\u003C\/p\u003E\u003Cblockquote class=\u0022wp-block-quote\u0022\u003E\n\u003Cp\u003EDiaspora* wurde kaum \u003Ca href=\u0022https:\/\/web.archive.org\/web\/20130630113539\/http:\/\/blog.diasporafoundation.org\/2012\/08\/27\/announcement-diaspora-will-now-be-a-community-project.html\u0022\u003Ef\u00fcr \u201etot\u201c erkl\u00e4rt\u003C\/a\u003E und schon steht das n\u00e4chste Projekt in den Startl\u00f6chern! \u003Ca href=\u0022https:\/\/web.archive.org\/web\/20190603031810\/https:\/\/tent.io\/\u0022\u003ETent.io\u003C\/a\u003E soll ein protocol for distributed social networking and personal data storage werden. Alles neu, alles anders, alles besser als OStatus, DiSo oder Diaspora*. Aber mal ganz ehrlich\u2026 was haben die Diasporas \u0026 Co. bisher geschaffen? Ziel war es Facebooks \u201eWalled Gardens\u201c aufzubrechen und was kam wirklich dabei rum? Eine ganze Reihe an dezentralen \u201eWalled Gardens\u201c. Na danke!\u003C\/p\u003E\n\u003Ccite\u003E\u003Ca href=\u0022https:\/\/notiz.blog\/2012\/11\/15\/dezentrale-walled-gardens\/\u0022\u003EDezentrale \u201eWalled Gardens\u201c\u003C\/a\u003E\u003C\/cite\u003E\u003C\/blockquote\u003E\u003Cp\u003EDas \u003Ca href=\u0022https:\/\/the-federation.info\/\u0022 data-type=\u0022URL\u0022 data-id=\u0022https:\/\/the-federation.info\/\u0022\u003Efediverse\u003C\/a\u003E hat (wie schon erw\u00e4hnt) bisher einen gro\u00dfartigen Job gemacht und verschiedenste Netzwerke mit den verschiedensten Auspr\u00e4gungen vernetzt! Ich \u003Cs\u003Eglaube\u003C\/s\u003E bin der festen \u00dcberzeugung, dass sich diesmal wirklich das offene Format (\u003Cem\u003EActivityPub\u003C\/em\u003E) durchsetzen wird und Blueskys \u003Cem\u003EAuthenticated Transfer Protocol\u003C\/em\u003E auch in ein paar Monaten oder Jahren keine Rolle spielen wird! \u003C\/p\u003E\u003Cp\u003E\u003Ca href=\u0022https:\/\/twitter.com\/benwerd\u0022 data-type=\u0022URL\u0022 data-id=\u0022https:\/\/twitter.com\/benwerd\u0022\u003EBen Werdmuller\u003C\/a\u003E hat eine gesunde Einstellung zu dem Thema:\u003C\/p\u003E\u003Cblockquote class=\u0022wp-block-quote\u0022\u003E\n\u003Cp\u003EI\u2019m so burned out by open source social, but I\u2019m glad to see people throw energy at the problem, even if it\u2019s not how I would have gone about it.\u003C\/p\u003E\n\u003Ccite\u003E\u003Ca href=\u0022https:\/\/twitter.com\/benwerd\/status\/1582554417693270016\u0022 data-type=\u0022URL\u0022 data-id=\u0022https:\/\/twitter.com\/benwerd\/status\/1582554417693270016\u0022\u003ETwitter\u003C\/a\u003E\u003C\/cite\u003E\u003C\/blockquote\u003E\u003Cp\u003EMehr hab ich dazu eigentlich nicht zu sagen, au\u00dfer dass wir in der \u003Ca href=\u0022https:\/\/neunetz.fm\/neunetzcast-93-was-wir-unter-dezentralitaet-verstehen-und-was-wir-uns-davon-erhoffen\/\u0022 data-type=\u0022URL\u0022 data-id=\u0022https:\/\/neunetz.fm\/neunetzcast-93-was-wir-unter-dezentralitaet-verstehen-und-was-wir-uns-davon-erhoffen\/\u0022\u003Eaktuellen Folge\u003C\/a\u003E des neunetzcasts sehr ausgiebig \u00fcber genau dieses Problem gesprochen haben!\u003C\/p\u003E\u003Cp\u003E\u003Ca rel=\u0022tag\u0022 class=\u0022u-tag u-category\u0022 href=\u0022https:\/\/notiz.blog\/tag\/activitypub\/\u0022\u003E#activitypub\u003C\/a\u003E \u003Ca rel=\u0022tag\u0022 class=\u0022u-tag u-category\u0022 href=\u0022https:\/\/notiz.blog\/tag\/bluesky\/\u0022\u003E#bluesky\u003C\/a\u003E \u003Ca rel=\u0022tag\u0022 class=\u0022u-tag u-category\u0022 href=\u0022https:\/\/notiz.blog\/tag\/fediverse\/\u0022\u003E#fediverse\u003C\/a\u003E \u003Ca rel=\u0022tag\u0022 class=\u0022u-tag u-category\u0022 href=\u0022https:\/\/notiz.blog\/tag\/matrix\/\u0022\u003E#matrix\u003C\/a\u003E \u003Ca rel=\u0022tag\u0022 class=\u0022u-tag u-category\u0022 href=\u0022https:\/\/notiz.blog\/tag\/twitter\/\u0022\u003E#twitter\u003C\/a\u003E\u003C\/p\u003E\u003Cp\u003E\u003Ca href=\u0022https:\/\/notiz.blog\/2022\/11\/14\/the-at-protocol\/\u0022\u003Ehttps:\/\/notiz.blog\/2022\/11\/14\/the-at-protocol\/\u003C\/a\u003E\u003C\/p\u003E","contentMap":{"de":"\u003Cp\u003EVor zwei Jahren wollte Twitter in das \u201eDezentrale Netzwerke\u201c-Business einsteigen und gr\u00fcndete eigens daf\u00fcr das \u003Ca href=\u0022https:\/\/notiz.blog\/2019\/12\/13\/twitiverse\/\u0022 data-type=\u0022post\u0022 data-id=\u002218831\u0022\u003EProjekt Bluesky\u003C\/a\u003E. In den folgenden zwei Jahren wurde viel evaluiert und diskutiert, was wohl die beste L\u00f6sung f\u00fcr Twitter sei und wir alle \u003Cem\u003Efieberten\u003C\/em\u003E mit ob es nun \u003Ca href=\u0022https:\/\/www.w3.org\/TR\/activitypub\/\u0022 data-type=\u0022URL\u0022 data-id=\u0022https:\/\/www.w3.org\/TR\/activitypub\/\u0022\u003EActivityPub\u003C\/a\u003E oder doch \u003Ca href=\u0022https:\/\/matrix.org\/\u0022 data-type=\u0022URL\u0022 data-id=\u0022https:\/\/matrix.org\/\u0022\u003EMatrix\u003C\/a\u003E werden w\u00fcrde\u2026 \u003C\/p\u003E\u003Cp\u003EAber das Warten hat ein Ende! \u003Ca href=\u0022https:\/\/blueskyweb.xyz\/blog\/10-18-2022-the-at-protocol\u0022 data-type=\u0022URL\u0022 data-id=\u0022https:\/\/blueskyweb.xyz\/blog\/10-18-2022-the-at-protocol\u0022\u003EBluesky hat verk\u00fcndet wie es weiter geht\u003C\/a\u003E!\u003C\/p\u003E\u003Cp\u003E\u003Cstrong\u003ESie entwickeln ein neues Protokoll!\u003C\/strong\u003E\u003C\/p\u003E\u003Cp\u003EDas \u003Cem\u003EAT Protocol\u003C\/em\u003E, kurz f\u00fcr \u003Cem\u003EAuthenticated Transfer Protocol\u003C\/em\u003E!\u003C\/p\u003E\u003Cp\u003EIch hab mir die \u003Ca href=\u0022https:\/\/atproto.com\/guides\/faq\u0022 data-type=\u0022URL\u0022 data-id=\u0022https:\/\/atproto.com\/guides\/faq\u0022\u003EFAQ\u003C\/a\u003E mal angeschaut und dort steht warum Bluesky sich gegen ActivityPub entschieden hat:\u003C\/p\u003E\u003Cblockquote class=\u0022wp-block-quote\u0022\u003E\n\u003Cp\u003EAccount portability is the major reason why we chose to build a separate protocol. We consider portability to be crucial because it protects users from sudden bans, server shutdowns, and policy disagreements. Our solution for portability requires both \u003Ca href=\u0022https:\/\/atproto.com\/guides\/data-repos\u0022\u003Esigned data repositories\u003C\/a\u003E and \u003Ca href=\u0022https:\/\/atproto.com\/guides\/identity\u0022\u003EDIDs\u003C\/a\u003E, neither of which are easy to retrofit into ActivityPub. The migration tools for ActivityPub are comparatively limited; they require the original server to provide a redirect and cannot migrate the user\u2019s previous data.\u003C\/p\u003E\n\u003C\/blockquote\u003E\u003Cp\u003EDas erinnert mich ein bisschen an die Subline von meinem \u003Ca href=\u0022https:\/\/pfefferle.dev\/openwebicons\/\u0022 data-type=\u0022URL\u0022 data-id=\u0022https:\/\/pfefferle.dev\/openwebicons\/\u0022\u003EOpenWeb-Icons Font\u003C\/a\u003E:\u003C\/p\u003E\u003Cblockquote class=\u0022wp-block-quote\u0022\u003E\n\u003Cp\u003EWhy \u003Cem\u003EOpenWeb Icons\u003C\/em\u003E? Because \u003Ca href=\u0022https:\/\/fortawesome.com\/\u0022 data-type=\u0022URL\u0022 data-id=\u0022https:\/\/fortawesome.com\/\u0022\u003EFont Awesome\u003C\/a\u003E had no RSS-icon [\u2026]\u003C\/p\u003E\n\u003C\/blockquote\u003E\u003Cp\u003E\u003Cstrong\u003EWeil ActivityPub keine perfekte L\u00f6sung f\u00fcr \u201eAccount portability\u201c hat, bauen sie ein komplett neues Protokoll?\u003C\/strong\u003E\u003C\/p\u003E\u003Cp\u003EActivityPub ist sicherlich nicht \u201efeature complete\u201c, aber ein guter erster Wurf, was das Fediverse erfolgreich bewiesen hat! Warum arbeitet Twitter also lieber an einem eigen Format anstatt mit dem W3C zusammen an ActivityPub v2?\u003C\/p\u003E\u003Cp\u003EWarum macht sich das W3C \u00fcberhaupt noch die M\u00fche \u201eStandards\u201c zu definieren?\u003C\/p\u003E\u003Cp\u003E\u003Cstrong\u003EWegen der Interoperabilit\u00e4t!\u003C\/strong\u003E\u003C\/p\u003E\u003Cp\u003EW\u00fcrde Twitter mit HTTP(S), HTML oder CSS \u00e4hnlich umgehen, w\u00fcrde der Browser einfach leer bleiben, weil das \u0026$%\u00a7\u0026 Internet nur mit einheitlichen Standards funktioniert!\u003C\/p\u003E\u003Cp\u003EUnd das gleiche gilt auch f\u00fcr dezentralte Netze, zumindest wenn sie erfolgreich sein wollen! Dar\u00fcber hab ich tragischerweise schon vor \u003Cstrong\u003E10 Jahren\u003C\/strong\u003E geschrieben!\u003C\/p\u003E\u003Cblockquote class=\u0022wp-block-quote\u0022\u003E\n\u003Cp\u003EDiaspora* wurde kaum \u003Ca href=\u0022https:\/\/web.archive.org\/web\/20130630113539\/http:\/\/blog.diasporafoundation.org\/2012\/08\/27\/announcement-diaspora-will-now-be-a-community-project.html\u0022\u003Ef\u00fcr \u201etot\u201c erkl\u00e4rt\u003C\/a\u003E und schon steht das n\u00e4chste Projekt in den Startl\u00f6chern! \u003Ca href=\u0022https:\/\/web.archive.org\/web\/20190603031810\/https:\/\/tent.io\/\u0022\u003ETent.io\u003C\/a\u003E soll ein protocol for distributed social networking and personal data storage werden. Alles neu, alles anders, alles besser als OStatus, DiSo oder Diaspora*. Aber mal ganz ehrlich\u2026 was haben die Diasporas \u0026 Co. bisher geschaffen? Ziel war es Facebooks \u201eWalled Gardens\u201c aufzubrechen und was kam wirklich dabei rum? Eine ganze Reihe an dezentralen \u201eWalled Gardens\u201c. Na danke!\u003C\/p\u003E\n\u003Ccite\u003E\u003Ca href=\u0022https:\/\/notiz.blog\/2012\/11\/15\/dezentrale-walled-gardens\/\u0022\u003EDezentrale \u201eWalled Gardens\u201c\u003C\/a\u003E\u003C\/cite\u003E\u003C\/blockquote\u003E\u003Cp\u003EDas \u003Ca href=\u0022https:\/\/the-federation.info\/\u0022 data-type=\u0022URL\u0022 data-id=\u0022https:\/\/the-federation.info\/\u0022\u003Efediverse\u003C\/a\u003E hat (wie schon erw\u00e4hnt) bisher einen gro\u00dfartigen Job gemacht und verschiedenste Netzwerke mit den verschiedensten Auspr\u00e4gungen vernetzt! Ich \u003Cs\u003Eglaube\u003C\/s\u003E bin der festen \u00dcberzeugung, dass sich diesmal wirklich das offene Format (\u003Cem\u003EActivityPub\u003C\/em\u003E) durchsetzen wird und Blueskys \u003Cem\u003EAuthenticated Transfer Protocol\u003C\/em\u003E auch in ein paar Monaten oder Jahren keine Rolle spielen wird! \u003C\/p\u003E\u003Cp\u003E\u003Ca href=\u0022https:\/\/twitter.com\/benwerd\u0022 data-type=\u0022URL\u0022 data-id=\u0022https:\/\/twitter.com\/benwerd\u0022\u003EBen Werdmuller\u003C\/a\u003E hat eine gesunde Einstellung zu dem Thema:\u003C\/p\u003E\u003Cblockquote class=\u0022wp-block-quote\u0022\u003E\n\u003Cp\u003EI\u2019m so burned out by open source social, but I\u2019m glad to see people throw energy at the problem, even if it\u2019s not how I would have gone about it.\u003C\/p\u003E\n\u003Ccite\u003E\u003Ca href=\u0022https:\/\/twitter.com\/benwerd\/status\/1582554417693270016\u0022 data-type=\u0022URL\u0022 data-id=\u0022https:\/\/twitter.com\/benwerd\/status\/1582554417693270016\u0022\u003ETwitter\u003C\/a\u003E\u003C\/cite\u003E\u003C\/blockquote\u003E\u003Cp\u003EMehr hab ich dazu eigentlich nicht zu sagen, au\u00dfer dass wir in der \u003Ca href=\u0022https:\/\/neunetz.fm\/neunetzcast-93-was-wir-unter-dezentralitaet-verstehen-und-was-wir-uns-davon-erhoffen\/\u0022 data-type=\u0022URL\u0022 data-id=\u0022https:\/\/neunetz.fm\/neunetzcast-93-was-wir-unter-dezentralitaet-verstehen-und-was-wir-uns-davon-erhoffen\/\u0022\u003Eaktuellen Folge\u003C\/a\u003E des neunetzcasts sehr ausgiebig \u00fcber genau dieses Problem gesprochen haben!\u003C\/p\u003E\u003Cp\u003E\u003Ca rel=\u0022tag\u0022 class=\u0022u-tag u-category\u0022 href=\u0022https:\/\/notiz.blog\/tag\/activitypub\/\u0022\u003E#activitypub\u003C\/a\u003E \u003Ca rel=\u0022tag\u0022 class=\u0022u-tag u-category\u0022 href=\u0022https:\/\/notiz.blog\/tag\/bluesky\/\u0022\u003E#bluesky\u003C\/a\u003E \u003Ca rel=\u0022tag\u0022 class=\u0022u-tag u-category\u0022 href=\u0022https:\/\/notiz.blog\/tag\/fediverse\/\u0022\u003E#fediverse\u003C\/a\u003E \u003Ca rel=\u0022tag\u0022 class=\u0022u-tag u-category\u0022 href=\u0022https:\/\/notiz.blog\/tag\/matrix\/\u0022\u003E#matrix\u003C\/a\u003E \u003Ca rel=\u0022tag\u0022 class=\u0022u-tag u-category\u0022 href=\u0022https:\/\/notiz.blog\/tag\/twitter\/\u0022\u003E#twitter\u003C\/a\u003E\u003C\/p\u003E\u003Cp\u003E\u003Ca href=\u0022https:\/\/notiz.blog\/2022\/11\/14\/the-at-protocol\/\u0022\u003Ehttps:\/\/notiz.blog\/2022\/11\/14\/the-at-protocol\/\u003C\/a\u003E\u003C\/p\u003E"},"to":["https:\/\/www.w3.org\/ns\/activitystreams#Public"],"cc":["https:\/\/www.w3.org\/ns\/activitystreams#Public"],"attachment":[{"type":"Image","url":"https:\/\/notiz.blog\/wp-content\/uploads\/2022\/11\/the-at-protocol.png","mediaType":"image\/png","name":"The Logo of the AT Protocol"}],"tag":[{"type":"Hashtag","href":"https:\/\/notiz.blog\/tag\/activitypub\/","name":"#activitypub"},{"type":"Hashtag","href":"https:\/\/notiz.blog\/tag\/bluesky\/","name":"#bluesky"},{"type":"Hashtag","href":"https:\/\/notiz.blog\/tag\/fediverse\/","name":"#fediverse"},{"type":"Hashtag","href":"https:\/\/notiz.blog\/tag\/matrix\/","name":"#matrix"},{"type":"Hashtag","href":"https:\/\/notiz.blog\/tag\/twitter\/","name":"#twitter"}]}";s:8:"response";a:1:{s:4:"code";i:200;}} \ No newline at end of file diff --git a/tests/test-class-activitypub-activity-dispatcher.php b/tests/test-class-activitypub-activity-dispatcher.php index a5dd7b90..228ee6d3 100644 --- a/tests/test-class-activitypub-activity-dispatcher.php +++ b/tests/test-class-activitypub-activity-dispatcher.php @@ -74,7 +74,7 @@ class Test_Activitypub_Activity_Dispatcher extends WP_UnitTestCase { return $in; } public static function http_request_args( $args, $url ) { - if ( in_array( parse_url( $url, PHP_URL_HOST ), array( 'example.com', 'example.org' ), true ) ) { + if ( in_array( wp_parse_url( $url, PHP_URL_HOST ), array( 'example.com', 'example.org' ), true ) ) { $args['reject_unsafe_urls'] = false; } return $args; diff --git a/tests/test-class-friends-feed-parser-activitypub.php b/tests/test-class-friends-feed-parser-activitypub.php index 79f5a74f..d0ae69fc 100644 --- a/tests/test-class-friends-feed-parser-activitypub.php +++ b/tests/test-class-friends-feed-parser-activitypub.php @@ -22,7 +22,7 @@ class Test_Friends_Feed_Parser_ActivityPub extends \WP_UnitTestCase { // Let's post a new Note through the REST API. $date = gmdate( \DATE_W3C, $now++ ); $id = 'test' . $status_id; - $content = 'Test ' . $date . ' ' . rand(); + $content = 'Test ' . $date . ' ' . wp_rand(); $request = new \WP_REST_Request( 'POST', '/activitypub/1.0/users/' . get_current_user_id() . '/inbox' ); $request->set_param( 'type', 'Create' ); @@ -74,7 +74,7 @@ class Test_Friends_Feed_Parser_ActivityPub extends \WP_UnitTestCase { // Do another test post, this time with a URL that has an @-id. $date = gmdate( \DATE_W3C, $now++ ); $id = 'test' . $status_id; - $content = 'Test ' . $date . ' ' . rand(); + $content = 'Test ' . $date . ' ' . wp_rand(); $request = new \WP_REST_Request( 'POST', '/activitypub/1.0/users/' . get_current_user_id() . '/inbox' ); $request->set_param( 'type', 'Create' ); @@ -142,10 +142,10 @@ class Test_Friends_Feed_Parser_ActivityPub extends \WP_UnitTestCase { $this->assertEquals( 202, $response->get_status() ); $p = wp_parse_url( $object ); - $cache = __DIR__ . '/fixtures/' . sanitize_title( $p['host'] . '-' . $p['path'] ) . '.response'; + $cache = __DIR__ . '/fixtures/' . sanitize_title( $p['host'] . '-' . $p['path'] ) . '.json'; $this->assertFileExists( $cache ); - $object = json_decode( wp_remote_retrieve_body( unserialize( file_get_contents( $cache ) ) ) ); + $object = json_decode( wp_remote_retrieve_body( json_decode( file_get_contents( $cache ), true ) ) ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents $posts = get_posts( array( @@ -244,18 +244,18 @@ class Test_Friends_Feed_Parser_ActivityPub extends \WP_UnitTestCase { return $in; } public static function http_request_args( $args, $url ) { - if ( in_array( parse_url( $url, PHP_URL_HOST ), array( 'mastodon.local' ), true ) ) { + if ( in_array( wp_parse_url( $url, PHP_URL_HOST ), array( 'mastodon.local' ), true ) ) { $args['reject_unsafe_urls'] = false; } return $args; } public static function pre_http_request( $preempt, $request, $url ) { $p = wp_parse_url( $url ); - $cache = __DIR__ . '/fixtures/' . sanitize_title( $p['host'] . '-' . $p['path'] ) . '.response'; + $cache = __DIR__ . '/fixtures/' . sanitize_title( $p['host'] . '-' . $p['path'] ) . '.json'; if ( file_exists( $cache ) ) { return apply_filters( 'fake_http_response', - unserialize( file_get_contents( $cache ) ), + json_decode( file_get_contents( $cache ), true ), // phpcs:ignore $p['scheme'] . '://' . $p['host'], $url, $request @@ -305,12 +305,12 @@ class Test_Friends_Feed_Parser_ActivityPub extends \WP_UnitTestCase { public static function http_response( $response, $args, $url ) { $p = wp_parse_url( $url ); - $cache = __DIR__ . '/fixtures/' . sanitize_title( $p['host'] . '-' . $p['path'] ) . '.response'; + $cache = __DIR__ . '/fixtures/' . sanitize_title( $p['host'] . '-' . $p['path'] ) . '.json'; if ( ! file_exists( $cache ) ) { $headers = wp_remote_retrieve_headers( $response ); - file_put_contents( + file_put_contents( // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_file_put_contents $cache, - serialize( + wp_json_encode( array( 'headers' => $headers->getAll(), 'body' => wp_remote_retrieve_body( $response ),