feat: Crosspost notes to GoToSocial (v2.1.0)
Published notes are copied to a GoToSocial (Mastodon-API) account and edits, unpublishing and deletes follow them (ADR-065). On by default for new notes, untickable in the editor and selectable from Micropub via mp-syndicate-to. A background worker reconciles each (note, target) row with atomic claims, an idempotency key and a version so edits during a send are not lost. Synced copies are linked with u-syndication. Also fixes the Micropub Location header and search result links, which pointed at /notes/<slug> (404), and the nested delete form on the edit page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
94e8c672df
commit
57b02ad6c7
19 files changed
+1049
-25
No files matched your search
+12
-2
@@ -336,6 +336,16 @@ def create_app(config=None):
|
||||
if hasattr(app, 'webmention_worker') and app.webmention_worker.is_alive():
|
||||
app.webmention_worker.stop()
|
||||
|
||||
# Start syndication worker when a target is configured (v2.1.0)
|
||||
if (app.config.get("GOTOSOCIAL_URL") and app.config.get("GOTOSOCIAL_ACCESS_TOKEN")
|
||||
and not app.config.get("TESTING", False)):
|
||||
from starpunk.syndication import SyndicationWorker
|
||||
app.syndication_worker = SyndicationWorker(
|
||||
app, poll_interval=app.config["SYNDICATION_POLL_INTERVAL"]
|
||||
)
|
||||
app.syndication_worker.start()
|
||||
app.logger.info("Syndication worker started")
|
||||
|
||||
# Health check endpoint for containers and monitoring
|
||||
@app.route("/health")
|
||||
def health_check():
|
||||
@@ -440,5 +450,5 @@ def create_app(config=None):
|
||||
|
||||
# Package version (Semantic Versioning 2.0.0)
|
||||
# See docs/standards/versioning-strategy.md for details
|
||||
__version__ = "2.0.2"
|
||||
__version_info__ = (2, 0, 2)
|
||||
__version__ = "2.1.0"
|
||||
__version_info__ = (2, 1, 0)
|
||||
Reference in new issue
Block a user