Open kixiQu opened 4 years ago
Thanks for sending this through. We you able to test the code with this code or is it a change in theory?
A change in theory alone
On Sun, Jul 19, 2020, 3:46 AM Remy Sharp notifications@github.com wrote:
Thanks for sending this through. We you able to test the code with this code or is it a change in theory?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/remy/wm/pull/31#issuecomment-660624423, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEOINLFPOLWOLUS4TI5AQ6LR4LFG7ANCNFSM4PAQ2RXA .
With change:
$ ./bin/wm.js https://maya.land/2020/07/18/test-post-2-fast-2-furious.html --debug
limit = 10
send = false
Fetching https://maya.land/2020/07/18/test-post-2-fast-2-furious.html
Content has microformats
entries = 1
mentions = 1
URLs to check: 1
endpoints = 1
endpoints-resolved = 1 {"source":"https://indieweb.xyz/en/hottubs","endpoint":{"url":"https://indieweb.xyz/webmention","type":"webmention"}}
Webmention endpoint found: [{"url":"https://indieweb.xyz/en/hottubs","source":"https://indieweb.xyz/en/hottubs","endpoint":{"url":"https://indieweb.xyz/webmention","type":"webmention"}}]
source = https://maya.land/2020/07/18/test-post-2-fast-2-furious.html
target = https://indieweb.xyz/en/hottubs
endpoint = https://indieweb.xyz/webmention (webmention)
without change:
$ ./bin/wm.js https://maya.land/2020/07/18/test-post-2-fast-2-furious.html --debug
limit = 10
send = false
Fetching https://maya.land/2020/07/18/test-post-2-fast-2-furious.html
Content has microformats
entries = 1
mentions = 0
URLs to check: 0
endpoints = 0
No webmention endpoints found on 1 entries found (try increasing with --limit N)
Originally the body of my post linked to indieweb.xyz which caused me some confusion because this line selected the body link not the syndication link, so the body link did not have the webmention endpoint attached to it. Separate issue, though.
Let me know if there's anything else you need here.
I noticed this as well while trying to automate sending webmentions to brid.gy.
As mentioned in #50, if the syndication links are inside of e-content
then the link is captured correctly. Because the syndication links are typically outside of e-content
similar to replies, bookmarks, etc, it makes sense to add it as shown in PR #31.
Expected working version https://www.benji.dog/notes/1667940289/
<article class="h-entry">
<details hidden>
<div class="p-author h-card"><!-- ... --></div>
<a class="u-url" href="/notes/1667940289/"></a>
<a rel="syndication noreferrer" class="u-syndication" href="https://brid.gy/publish/mastodon"></a>
</details>
<div class="e-content">
<p><!-- ... --></p>
</div>
<footer><!-- ... --></footer>
</article>
Current working version https://www.benji.dog/notes/1667939162/
<article class="h-entry">
<details hidden>
<div class="p-author h-card"><!-- ... --></div>
<a class="u-url" href="/notes/1667939162/"></a>
</details>
<div class="e-content">
<p><!-- ... --></p>
<details hidden><a rel="syndication noreferrer" class="u-syndication" href="https://brid.gy/publish/mastodon"></a></details>
</div>
<footer><!-- ... --></footer>
</article>
In a HWC, someone recommended sending mentions for all u-*
urls. This would also work with u-bridgy-fed urls.
Sites like https://indieweb.xyz and https://news.indieweb.org use a webmention sent for a link with "u-syndication" indicated, see: https://indieweb.xyz/howto/en and https://news.indieweb.org/how-to-submit-a-post It's possible that this would be a good moment to reexamine whether there are other classes of link that merit inclusion here, but this change is limited to what I know would be useful for a user of the service (i.e., me).
I think this might be my first Github PR? Please let me know if there's anything I can do to make this an acceptable change.