- mp-syndicate-to/mp-slug read from JSON properties; absent means no
crossposting
- Sanitize rendered HTML (nh3 allowlist)
- q=source/q=category need a posting scope; draft scope creates drafts;
private/unlisted visibility saved as drafts
- Photos that can't be fetched or found fail the request; remote photos
via the SSRF-checked, pinned fetcher
- JSON scalars wrapped, update delete values must be arrays
- bookmark-of stored; HTML content returned as {html} (migration 015)
- published stored as UTC, bad dates 400; malformed JSON 400
- Auth: case-insensitive Bearer, header+body 400, WWW-Authenticate
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
13 lines
893 B
HTML
13 lines
893 B
HTML
{# "Liked" / "Reposted" line for likes and reposts (v2.5.0) #}
|
|
{% macro reaction(note) %}
|
|
{% if note.reacts_to %}
|
|
{% set ctx = note.context if note.context is defined else None %}
|
|
{% if ctx and ctx.title %}{% set label = ctx.title %}{% elif ctx and ctx.content_snippet %}{% set label = ctx.content_snippet|striptags|truncate(90) %}{% elif ctx and (ctx.author_name or ctx.site_name) %}{% set label = 'a post' %}{% else %}{% set label = note.reacts_to %}{% endif %}
|
|
<p class="reaction reaction-{{ note.kind }}">
|
|
<span class="reaction-verb">{{ {'like': '★ Liked', 'repost': '🔁 Reposted', 'bookmark': '🔖 Bookmarked'}[note.kind] }}</span>
|
|
<a class="u-{{ note.kind }}-of" href="{{ note.reacts_to }}">{{ label }}</a>
|
|
{% if ctx and (ctx.author_name or ctx.site_name) %}<span class="reaction-by">by {{ ctx.author_name or ctx.site_name }}</span>{% endif %}
|
|
</p>
|
|
{% endif %}
|
|
{% endmacro %}
|