Salmention is a protocol extension to Webmention to propagate comments and other interactions upstream by sending a webmention from a response to the original post when the response itself receives a response (comment, like, etc.). The original post then checks the response to the original, parses the response to the response (e.g. comment on a comment) and then displays it as an additional response on the original post.
Webmention with Salmention depends on understanding Webmention. Please read that first.
- This is a Living Specification yet mature enough to encourage implementations and feedback.
- Latest Published Version
- discussion on #indieweb-dev (on Libera IRC)
- Ben Roberts
- Tantek Çelik
- Other contributors: revision history
- Per CC0, to the extent possible under law, the editor(s) and contributors have waived all copyright and related or neighboring rights to this work. In addition, as of 2022-01-18, the editor(s) and contributors (2015-04-07 onward) have made this specification available under the Open Web Foundation Agreement Version 1.0.
A Webmention is a notification that one URL links to another, usually a comment or other response. A Salmention is a special Webmention notification both that one URL links to another, and that one URL received and displayed the result of a Webmention itself. For example:
When Bob writes a reply on his website in response to a post on Alice's website, his site sends a webmention notifying her of his response, which her site's software can do with as it wishes, like display it as a comment on her post.
When Carol writes a reply on her site in response to Bob's comment, her site similarly sends a webmention to Bob … but what about Alice, who may wish to display this nested comment on her post?
This is where the Salmention extension comes in.
When Bob's post is updated to display Carol's reply, Bob's site sends a webmention update (a salmention) to Alice, even though Bob's post content itself hasn't changed. Alice's website software looks for new information on Bob's post, which now includes Carol's response and displays it as a nested response.
Salmention is a protocol between a salmention sender and a salmention receiver. In the example above:
- The salmention sender is Bob’s site, it sends a webmention upstream whenever it itself displays the result of receiving a webmention.
- The salmention receiver is Alice's site, when it receives the webmention update from Bob's site, it not only parses Bob's reply for any updates, but it also explicitly looks for responses to Bob's post, parses those, finds Carol's reply to Bob, and displays it as well.
An implementation that sends and receives Webmentions can send Salmentions by doing the following:
When it receives and accepts a Webmention from a response to an original post:
- Incorporate (or update) the response into the original post’s permalink by nesting the response inside the original, keeping track of whether any changes actually occurred.
- If there were any changes (a new or updated response), then resend Webmentions to everything the original post sent webmentions to.
That act of resending those Webmentions when an original post is updated in response to responses is called “sending Salmentions”.
An implementation that receives Webmentions can receive Salmentions by doing the following:
When it receives a Webmention, in addition to normal Webmention processing:
- Store the contents of the source of the Webmention in such a way that it can be rechecked in the future for any changes.
When it receives a previously received Webmention:
- Check the source of the Webmention for any changes since the previous Webmention (using aforementioned stored contents), in particular any new responses to the source
- Incorporate any new response(s) to the source both into those stored contents, and display as inline responses to the target itself.
- E.g. displaying a reply to a reply, as an additional comment on the original post.
- If the previous Webmention generated a notification, then the new response(s) should as well.
The act of noticing a re-receiving of a Webmention and doing something when there are changes in the source, specifically nested responses, is called “receiving Salmentions”.
In order of implementation
Kyle Mahan supports sending and receiving Salmentions on his site since 2015-06-09.
- First mention sent: https://kylewm.com/2015/06/i-have-to-go-to-bed-now-if-this-works-or-not-so-i
- and received: https://kylewm.com/2015/06/yeah-comment-threads-are-sort-of-a-todo-for-the-indieweb#kyle_mahan-4565
Ashton McAllan supports sending and receiving Salmentions on her site since 2015-06-13.
- Recieving: https://acegiak.net/2015/06/09/not-necessarily-threaded-comments-like-reddit-but-i-think-theres-broad-consensus-that-if-you-reply-to-a-reply-it-would-be/
- Sending: https://acegiak.net/2015/06/13/i-have-to-go-to-bed-now-if-this-works-or-not-so-i-hope-it-works/
- Here's an example of a salmentioned comment received from a Known site: https://kylewm.com/2016/05/nice-you-were-a-good-test-case-for-woodwind-there
This section is closed. Please add to https://github.com/indieweb/salmention/issues instead.
Awaiting original authors to move this issue to https://github.com/indieweb/salmention/issues:
Comment thread on separate page from post
This protocol requires that all replies be displayed on the same page as the post itself. I prefer to have the "conversation" on a second page, linked to from the post.
Idea: forward the webmention upstream instead of repeating the webmention from yourself. Then, upstream can parse the reply-to-reply, see that it is in reply to a comment in a conversation it manages, and add to the thread accordingly. No display of the replies on the intermediate site is required at all for this flow.
ActivityPub describes a similar process to Salmention for propagating updates between systems. If one of your posts receives a mention (eg. as the target of a like, repost or inReplyTo, etc), your server should send the new post (the one that mentions you) to all recipients of your original post. (In ActivityPub, your server pushes your posts out to your followers, and retains a list of everyone posts are sent to, but this basically translates to sending a webmention to the original post).