From 7c0cb7f3e81176d8428239ba1edec469a24bfad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=BCsken?= Date: Mon, 14 Oct 2024 11:23:07 +0200 Subject: [PATCH] Fixfor urls and hashtags in profiles are not converted (#940) --- includes/class-hashtag.php | 6 +++--- includes/class-link.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/class-hashtag.php b/includes/class-hashtag.php index db62f436b..5b1738c9a 100644 --- a/includes/class-hashtag.php +++ b/includes/class-hashtag.php @@ -33,11 +33,11 @@ public static function init() { */ public static function filter_activity_object( $activity ) { /* phpcs:ignore Squiz.PHP.CommentedOutCode.Found - Removed until this is merged: https://github.com/mastodon/mastodon/pull/28629 - if ( ! empty( $activity['summary'] ) ) { + Only changed it for Person and Group as long is not merged: https://github.com/mastodon/mastodon/pull/28629 + */ + if ( ! empty( $activity['summary'] ) && in_array( $activity['type'], array( 'Person', 'Group' ), true ) ) { $activity['summary'] = self::the_content( $activity['summary'] ); } - */ if ( ! empty( $activity['content'] ) ) { $activity['content'] = self::the_content( $activity['content'] ); diff --git a/includes/class-link.php b/includes/class-link.php index 3c53f3bb8..6da1233c4 100644 --- a/includes/class-link.php +++ b/includes/class-link.php @@ -29,11 +29,11 @@ public static function init() { */ public static function filter_activity_object( $activity ) { /* phpcs:ignore Squiz.PHP.CommentedOutCode.Found - Removed until this is merged: https://github.com/mastodon/mastodon/pull/28629 - if ( ! empty( $activity['summary'] ) ) { + Only changed it for Person and Group as long is not merged: https://github.com/mastodon/mastodon/pull/28629 + */ + if ( ! empty( $activity['summary'] ) && in_array( $activity['type'], array( 'Person', 'Group' ), true ) ) { $activity['summary'] = self::the_content( $activity['summary'] ); } - */ if ( ! empty( $activity['content'] ) ) { $activity['content'] = self::the_content( $activity['content'] );