Post to mastodon from the profile page for logged in users

This commit is contained in:
2026-08-26 10:20:48 +02:00
parent 9deb28330a
commit 95accdf436
13 changed files with 136 additions and 5 deletions
+7
View File
@@ -150,5 +150,12 @@ class PluginManager:
logger.debug('Plugin dispatch result: plugin=%s event_id=%s result=%s', plugin.name, event.get('id'), result)
return results
def post_to_mastodon(self, event):
self.refresh_from_db()
plugin = next(plugin for plugin in self.plugins if plugin.name == 'mastodon')
if not plugin.enabled:
return {'status': 'skipped', 'plugin': 'mastodon', 'reason': 'disabled'}
return plugin.handle_event(event)
plugin_manager = PluginManager()