Skip to content

fix(endpoint-webmention-io): cope with authors without a photo or a valid URL - #935

Merged
paulrobertlloyd merged 1 commit into
mainfrom
fix/endpoint-webmention-io-avatar
Sep 5, 2026
Merged

paulrobertlloyd merged 1 commit into
mainfrom
fix/endpoint-webmention-io-avatar

Conversation

@rmdes

@rmdes rmdes commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Fixes #934.

  • avatar is only set when the author has a photo; the fixture author has none, and the list rendered <img class="avatar" src=""> for it.
  • getAuthorName returns author.name before touching the URL, and returns the raw value when it doesn’t parse, instead of throwing TypeError: Invalid URL.
  • The webmention.io fetch gets AbortSignal.timeout(15_000); a timeout reaches the error handler like any other fetch failure.
  • Tests: integration test asserts no img.avatar (fails on main: 1); two unit cases for non-URL author values (fail on main with Invalid URL).

Verified locally: node --test packages/endpoint-webmention-io/test/**/*.js 16/16, eslint and prettier clean.

…alid URL

The list rendered an empty avatar for an author with no photo, and
threw when an author URL didn’t parse even though a name was given.
Also time out the webmention.io request after 15 seconds.

Fixes #934
@paulrobertlloyd paulrobertlloyd added code quality Making things easier to understand plugin-endpoint Endpoint plug-in labels Sep 5, 2026
@paulrobertlloyd paulrobertlloyd added this to the v1.0 milestone Sep 5, 2026
@paulrobertlloyd
paulrobertlloyd merged commit 98dbd80 into main Sep 5, 2026
1 check passed
@paulrobertlloyd
paulrobertlloyd deleted the fix/endpoint-webmention-io-avatar branch September 5, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code quality Making things easier to understand plugin-endpoint Endpoint plug-in

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Webmentions list renders an empty avatar for authors without a photo, and throws for an author whose URL isn’t a URL

2 participants