Open Menrath opened 1 month ago
This a general problem we have to address! The current dispatching is only working for the current setup and scales not very well.
But this is such a big feature, that I procrastinated it :)
See: https://github.com/Automattic/wordpress-activitypub/pull/593
I totally forgot about #593. It's on hold for quite some time indeed! Since that might indeed be a breaking API change, a possible clean solution until then could be that we create a public static wrapper for send_activity_to_followers
which will be deprecated once #593 gets completed. Or once the API part is already clear one could already provide that public function but internally still use the old ones. But I am not in a hurry, I will merge features like that on our side once things are settled here!
What
Currently the send_announce function is not suited for handling general announces, it is tied especially to the blog/user actor behavior, where the blog actor might announce posts of users of both actor types are enabled.
Why
General reasons:
Concrete use-case: E.g., for the ActivityPub Event Bridge WordPress-Plugin, I was implementing a feature that would schedule a single self-announce of an Event ActivityPub object at a defined time before the event starts.
How
Two solutions come up my mind:
send_activity_to_followers
a public static function, allowing other plugins to totally create custom activities.send_announce
function more flexible: add a thirduser_id
param that might override the current behavior.