-
Notifications
You must be signed in to change notification settings - Fork 83
Add bot account support for blog and user profiles #2861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
Allow marking blog and user profiles as bot accounts, which changes the Actor type from Person/Group to Service. This causes Mastodon and other Fediverse platforms to display a "BOT" badge. - Add activitypub_blog_is_bot option for blog profile - Add activitypub_is_bot user option for author profiles - Modify Blog::get_type() to check bot setting - Modify User::get_type() to check user bot setting - Add UI fields to blog profile and user profile settings - When relay mode is enabled, show notice that bot is implied
There was a problem hiding this 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 adds the ability to mark both blog and user profiles as bot/automated accounts in ActivityPub, making them display with a "BOT" badge on Mastodon and other Fediverse platforms. This promotes transparency about automated content by changing the Actor type from Person/Group to Service.
Changes:
- Added "Bot Account" checkbox settings for both blog profiles and user profiles in the WordPress admin
- Modified the
get_type()methods to returnServicewhen bot mode is enabled - Blog profile bot setting respects existing relay mode (which already implies bot status)
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| includes/wp-admin/class-user-settings-fields.php | Adds bot account checkbox field to user profile settings |
| includes/wp-admin/class-blog-settings-fields.php | Adds bot account checkbox field to blog profile settings with relay mode awareness |
| includes/wp-admin/class-admin.php | Registers the user bot option in the required user options array |
| includes/model/class-user.php | Updates user actor type to Service when bot flag is enabled |
| includes/model/class-blog.php | Updates blog actor type to Service when bot flag is enabled |
| includes/class-options.php | Registers the blog bot option setting |
| .github/changelog/add-bot-account-support | Adds changelog entry for the new feature |
|
I generally like the idea but it might break things! I am not sure if this should be a user facing setting or if it should be done through filters!? Setting the Blog-User to a |
|
Would it make sense for a single-user site that has a blog-user to be able to set the tag, but a multiuser site not be able to? I'm also okay making this only a filter for now and leaving the UI for another PR/another day. |
…federation In multi-user mode, the blog actor is a Group, and changing it to Service would break FEP-1b12 group federation. This limits the bot option to single-user mode where the blog actor is Person, making Person → Service safe. The setting is both hidden from UI and ignored in get_type() when in multi-user mode.
|
Good point on the Group → Service concern — that would break FEP-1b12 group federation. I pushed a commit that scopes the blog bot option to single-user mode only:
One question — when you mentioned this might be better handled through filters rather than a user-facing setting, were you thinking about the whole bot feature (including user profiles), or specifically the blog profile? For user profiles, a simple checkbox feels like the right UX since there's no protocol side effect. Curious about your thinking there. |
Proposed changes:
Being a good Fediverse citizen means being transparent about automated accounts. Mastodon and other platforms display a "BOT" badge on profiles that identify as bots or automated accounts, helping users understand they're interacting with automated content.
This PR adds the ability to mark blog and user profiles as bot accounts:
typefromPerson/GrouptoService, which Fediverse platforms recognize as a botThis is useful for:
This branch is currently running on kraft.beer for the
@beers@kraft.beeraccount.Screenshots
Other information:
Testing instructions:
/?author=0) and verify"type": "Service"appears in the JSON"type": "Service"appearsChangelog entry
Changelog Entry Details
Significance
Type
Message
Add bot account option for blog and user profiles. When enabled, the profile displays with a "BOT" badge on Mastodon and other Fediverse platforms.