Skip to content
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

Feature Request: Add more flexibility to send_announce or make send_activity_to_followers a public function. #938

Open
Menrath opened this issue Oct 11, 2024 · 2 comments

Comments

@Menrath
Copy link
Contributor

Menrath commented Oct 11, 2024

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:

  • Other plugins might want to send Activities to followers that are not native to the ActivityPub plugin.
  • There could also be the desire in the future that e.g. an Announce can also be done for external ActivityPub objects.

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:

  1. Make the send_activity_to_followers a public static function, allowing other plugins to totally create custom activities.
  2. Make the send_announce function more flexible: add a third user_id param that might override the current behavior.
@pfefferle
Copy link
Member

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: #593

@Menrath
Copy link
Contributor Author

Menrath commented Oct 12, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants