Skip to content

Conversation

@pfefferle
Copy link
Member

@pfefferle pfefferle commented Aug 6, 2025

Added is_actor() check before filtering activity summaries in Hashtag and Link classes to ensure correct processing. Updated generate_post_summary to return plain content instead of applying 'the_excerpt' filter, due to lack of proper HTML support in ActivityPub summaries.

Revert 170bab3

Fixes #2059 #2062

Proposed changes:

  • Removes HTML from post summaries by bypassing the the_excerpt filter
  • Adds is_actor() validation before applying content filtering in Hashtag and Link classes

Other information:

  • Have you written new tests for your changes, if applicable?

Testing instructions:

  • Write a post with a summary
  • Check JSON

Changelog entry

  • Automatically create a changelog entry from the details below.
Changelog Entry Details

Significance

  • Patch
  • Minor
  • Major

Type

  • Added - for new features
  • Changed - for changes in existing functionality
  • Deprecated - for soon-to-be removed features
  • Removed - for now removed features
  • Fixed - for any bug fixes
  • Security - in case of vulnerabilities

Message

Switches ActivityPub summaries to plain text for better compatibility.

Added is_actor() check before filtering activity summaries in Hashtag and Link classes to ensure correct processing. Updated generate_post_summary to return plain content instead of applying 'the_excerpt' filter, due to lack of proper HTML support in ActivityPub summaries.
@pfefferle pfefferle requested review from Copilot and obenland and removed request for Copilot August 6, 2025 15:36
@pfefferle pfefferle self-assigned this Aug 6, 2025
Copilot AI review requested due to automatic review settings August 6, 2025 15:36

This comment was marked as outdated.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes ActivityPub summary generation and filtering by removing HTML content from summaries and adding proper actor validation. The main purpose is to improve compatibility by switching to plain text summaries and ensuring filtering only applies to actor activities.

  • Removes HTML from post summaries by bypassing the the_excerpt filter
  • Adds is_actor() validation before applying content filtering in Hashtag and Link classes

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
includes/functions.php Updates generate_post_summary to return plain content instead of filtered HTML
includes/class-link.php Adds actor validation before processing activity summaries
includes/class-hashtag.php Adds actor validation before processing activity summaries

@pfefferle pfefferle changed the title Improve activity summary filtering and summary generation Improve summary generation Aug 6, 2025
@pfefferle pfefferle merged commit 90aae4f into trunk Aug 6, 2025
12 checks passed
@pfefferle pfefferle deleted the revert/170bab3 branch August 6, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misskey Compatibility Feedback: Follow-up test after fix for multibyte character corruption in post summaries (#1995)

3 participants