Skip to content

Improve Webmention endpoint response messages#611

Merged
pfefferle merged 4 commits into
mainfrom
fix/176-duplicate-webmention-message
Jun 11, 2026
Merged

Improve Webmention endpoint response messages#611
pfefferle merged 4 commits into
mainfrom
fix/176-duplicate-webmention-message

Conversation

@pfefferle

Copy link
Copy Markdown
Owner

Summary

Fixes #176

When a Webmention is received for a source/target combination that already exists, check_dupes() matches the existing comment and the endpoint updates it — but it still responded with "Webmention was successful". Users who had already sent a Webmention natively and then tried the form on the target page found this confusing.

Changes

  • The update path now returns its own message: "You already sent a Webmention for this target. The existing Webmention has been updated." — filterable via the new webmention_update_message hook.
  • The default success message is friendlier: "Thank you! Your Webmention has been received." (both in the regular success response and the target-update path; still filterable via webmention_success_message).

Note on the trim() warning quoted in the issue

The trim() expects parameter 1 to be string, array given warning in the issue's quoted output comes from the deprecated semantic-linkbacks plugin, not from this codebase. An audit of this plugin's equivalent paths (mf2 handler, response/header parsing, sanitization) found the same failure class is already guarded against, so there is nothing to fix here.

When check_dupes() matches an existing comment, the endpoint updated the
Webmention but still responded with 'Webmention was successful', which
confused users who had already sent one natively and then tried the
form again. Return a distinct, filterable message for the update case.

Fixes #176
When check_dupes() matches an existing comment, the endpoint updated
the Webmention but still responded with 'Webmention was successful',
which confused users who had already sent one natively and then tried
the form again. Return a distinct, filterable message for the update
case and use a friendlier default for the success message.

Fixes #176
@pfefferle pfefferle merged commit 5ef1f4e into main Jun 11, 2026
8 checks passed
@pfefferle pfefferle deleted the fix/176-duplicate-webmention-message branch June 11, 2026 07:29
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.

Change message when webmention already exist.

1 participant