Skip to content

fix: share-link viewer mapping + fakeln callback scheme - #182

Merged
argiad merged 2 commits into
developmentfrom
fix/share-link-viewer-mapping-fakeln-scheme
Nov 12, 2026
Merged

argiad merged 2 commits into
developmentfrom
fix/share-link-viewer-mapping-fakeln-scheme

Conversation

@argiad

@argiad argiad commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Two fixes found testing #181 on stage:

Viewer rendered every live stream as idle (share link or not)

  • ViewerApiClient.getStream/getPublicStream cast raw snake_case StreamResponse JSON to camelCase StreamInfo — active, viewerCount, hostDisplayName, startedAt all undefined. Live streams showed 'No active stream' and never joined.
  • Both methods now map through mapStreamInfo; regression test pinned against a real stage response body.
  • Viewer suite 29/29 green, production build passes.

Paywall invoice could never settle on the demo path

  • fakeln built the LNURL callback as https:// for any Host not starting with localhost/127., while mm-payment treats RFC 6761 names (*.test, *.local, *.localhost) as plain HTTP. A creator address via docker alias (stage@fakestripe.test:8787) got an https:// callback for a plain-HTTP server.
  • Scheme rule now mirrors LightningAddress::is_local_domain exactly, with a unit test pinning the agreement. mm-fakestripe suites green.

fake_lnurl_metadata built the callback as https:// for any Host that
did not start with localhost/127. — but mm-payment treats RFC 6761
names (*.test, *.local, *.localhost) as plain HTTP. A creator address
routed via a docker alias (stage@fakestripe.test:8787) got an https://
callback for a plain-HTTP server, so invoice creation failed and the
share-link paywall could never settle on the demo path. The scheme now
mirrors LightningAddress::is_local_domain exactly, with a unit test
pinning the agreement.
ViewerApiClient cast the raw snake_case JSON straight to camelCase
StreamInfo, so stream.active, viewerCount, hostDisplayName and
startedAt were all undefined: every watch page rendered a live
stream as idle ('No active stream'), never joined it, and hid the
host/count. Both getStream and getPublicStream now go through
mapStreamInfo; a regression test pins the mapping against a real
stage response body.
@argiad
argiad merged commit 8db3f68 into development Nov 12, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant