- Issue created by @MegaKeegMan
- πΊπΈUnited States MegaKeegMan
I started an issue fork, starting by attempting a refactor of the ECA plugin into multiple with different concerns. The idea was that there could be an action that prepares the mastodon post manager for posting, and then a separate one that was actually responsible for posting. Unfortunately, I have not yet been able to find a way to make the same instance of a service available across plugins in the same model. I wanted to do this so that someone could prepare the post manager once, and then post as many times as they wanted.
I don't necessarily want to continue on this at the moment, and may just continue separating out the functionality from doPost, and putting too much into the execute of the Toot action class. If ever we want ECA to be able to post multiple posts, then we should probably instead focus on queuing up posts and then having a single action that processes the queue and can post several posts at a time, or something along those lines, especially if I get confirmation that preparing a service in one plugin instance, there is no way to keep it available for another plugin instance.
- πΊπΈUnited States MegaKeegMan
Such a queuing functionality should probably be a separate feature request. Also noteworthy that https://www.drupal.org/project/social_post_controller β does actually manage such a queue for posting to social media, but does so via code, and not with any integration with ECA. I think it does make sense to have queuing here, but it should probably be noted that Social Post Controller should probably not be used on a site that is managing queues via an ECA, assuming that such plugins are created.
- πΊπΈUnited States MegaKeegMan
Upon learning that I should not need to store the service instance in order to keep it available, I made one more attempt at that pattern. Unfortunately it did not work. My previous comment is probably the path forward here.