Rebrand sexp → sx across web platform (173 files)
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 11m37s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 11m37s
Rename all sexp directories, files, identifiers, and references to sx. artdag/ excluded (separate media processing DSL). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"""Federation app fragment endpoints.
|
||||
|
||||
Exposes sexp fragments at ``/internal/fragments/<type>`` for consumption
|
||||
Exposes sx fragments at ``/internal/fragments/<type>`` for consumption
|
||||
by other coop apps via the fragment client.
|
||||
"""
|
||||
|
||||
@@ -25,15 +25,15 @@ def register():
|
||||
async def get_fragment(fragment_type: str):
|
||||
handler = _handlers.get(fragment_type)
|
||||
if handler is None:
|
||||
return Response("", status=200, content_type="text/sexp")
|
||||
return Response("", status=200, content_type="text/sx")
|
||||
src = await handler()
|
||||
return Response(src, status=200, content_type="text/sexp")
|
||||
return Response(src, status=200, content_type="text/sx")
|
||||
|
||||
# --- link-card fragment: actor profile preview card --------------------------
|
||||
|
||||
def _federation_link_card_sexp(actor, link: str) -> str:
|
||||
from shared.sexp.helpers import sexp_call
|
||||
return sexp_call("link-card",
|
||||
def _federation_link_card_sx(actor, link: str) -> str:
|
||||
from shared.sx.helpers import sx_call
|
||||
return sx_call("link-card",
|
||||
link=link,
|
||||
title=actor.display_name or actor.preferred_username,
|
||||
image=None,
|
||||
@@ -59,7 +59,7 @@ def register():
|
||||
parts.append(f"<!-- fragment:{u} -->")
|
||||
actor = await services.federation.get_actor_by_username(g.s, u)
|
||||
if actor:
|
||||
parts.append(_federation_link_card_sexp(
|
||||
parts.append(_federation_link_card_sx(
|
||||
actor, federation_url(f"/users/{actor.preferred_username}"),
|
||||
))
|
||||
return "\n".join(parts)
|
||||
@@ -71,7 +71,7 @@ def register():
|
||||
actor = await services.federation.get_actor_by_username(g.s, lookup)
|
||||
if not actor:
|
||||
return ""
|
||||
return _federation_link_card_sexp(
|
||||
return _federation_link_card_sx(
|
||||
actor, federation_url(f"/users/{actor.preferred_username}"),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user