feat: reply contexts that show the post (v2.19.0)

Replies to Mastodon posts showed only the server's domain: the page has no
h-entry, so nothing was found and the host stood in for the author.

- Context sources in order: Bluesky AppView API, microformats, the
  origin's Mastodon API or this site's GoToSocial instance, OpenGraph
- Migration 024: author_handle, photo, photo_alt, source; rows without a
  source are fetched again once by the webmention worker
- Note page: a card with avatar, name, handle, text, image and date;
  home/tag/likes: "In reply to <author>" with a short quote
- Avatars and images saved locally (CSP allows only this site's images);
  avatar upkeep now covers reply contexts so their avatars aren't removed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
PhilandClaude Opus 5.5 committed 2026-11-13 15:10:46 -07:00
1 parent 22e588377f
commit 62e257e0e0
14 files changed
+1094 -309

No files matched your search

+10 -2
View File
@@ -225,6 +225,14 @@ def create_app(config=None):
name = cached_name(app.config.get('DATA_PATH', 'data'), url)
return url_for('public.avatar', name=name) if name else None
# Template filter - local copy of a replied-to post's image, or None (v2.19.0)
@app.template_filter('local_preview')
def local_preview_filter(url):
from flask import url_for
from starpunk.avatars import cached_preview
name = cached_preview(app.config.get('DATA_PATH', 'data'), url)
return url_for('public.preview', name=name) if name else None
# Template filter - URL to color for facepile (v1.6.0)
@app.template_filter('url_to_color')
def url_to_color_filter(url):
@@ -468,5 +476,5 @@ def create_app(config=None):
# Package version (Semantic Versioning 2.0.0)
# See docs/standards/versioning-strategy.md for details
__version__ = "2.18.3"
__version_info__ = (2, 18, 3)
__version__ = "2.19.0"
__version_info__ = (2, 19, 0)