Skip to content

Send Add/Remove activities when changing a post's sticky statusΒ #2795

@jfietkau

Description

@jfietkau

What

When the sticky status of a post is changed, it would improve interoperability if the plugin could send not just an Update of the actor, but also a specific Add or Remove activity for the collection and the affected post.

Why

When someone sets or unsets a post's sticky flag, it is added to or removed from the ActivityPub actor's featured collection. Since #1982, followers are notified about this change through a federated Update of the actor, which should trigger a refresh of the profile on remote servers.

There is another possible way to signal changes to a collection: Add or Remove activities. Going by a quick experiment on activitypub.academy, it looks like this is what Mastodon uses instead of a generic Update.

Ideally, receiving platforms should understand both. However, I ran into an interoperability problem with Bridgy Fed, which currently fails to parse the change in the featured collection from an Update sent by this plugin (see snarfed/bridgy-fed#2302). The timeline for this to be fixed on the Bridgy Fed side seems uncertain, as it's more of a general data structure handling problem that will need to be fixed carefully, but isn't super urgent from their perspective.

However, I would love for my stickied posts to get bridged as sticky to Bluesky πŸ˜…, and I assume it's in your interest to achieve even broader interoperability (other platforms besides Bridgy Fed could be experiencing similar issues). Therefore, I think it would be great if WordPress could federate Add and Remove activities on sticky post changes, either in addition to or instead of Update activities. I think sending both would be simplest – (un-)stickying is a relatively rare action and the added traffic should be negligible.

How

The schema for these activities is very simple, since even Mastodon relies on sending object IDs instead of inlined payloads. Here's an example nabbed from activitypub.academy:

{
  "@context":"https://www.w3.org/ns/activitystreams",
  "type":"Add",
  "actor":"https://activitypub.academy/users/fabicus_acdurath",
  "target":"https://activitypub.academy/users/fabicus_acdurath/collections/featured",
  "object":"https://activitypub.academy/users/fabicus_acdurath/statuses/115930055907115338"
}

So you just need the IDs of the actor, its featured collection, and the post being added or removed.

Is this an addition that sounds sensible? I think it's not very complicated and this way you could likely solve my problem before Ryan does.

The blog I've been tasked with setting up is this one by the way, feel free to look around if you're interested. And thanks for all your work!

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions