#dev 2023-02-23

2023-02-23 UTC
bterry, gerben and geoffo joined the channel
#
[tantek]
is anyone federating to Mastodon via Bridgy Fed and getting their hashtags to show up as links and if so, how?
#
[tantek]
also wondering if we have enough microsyntax publishing (and possibly consuming?) examples to write at least a draft spec based on best practices for marking up microsyntax plain text content inside an h-entry
#
[tantek]
e.g. we have a whole page on marking up a /person-mention or a /hashtag but no overall page gathering these, and on the consuming side, how to parse these from inside an h-entry
[snarfed] joined the channel
#
[snarfed]
[tantek] federating hashtags is an open question https://github.com/snarfed/bridgy-fed/issues/45
#
Loqi
[preview] [EdwardHinkle] #45 Post with hashtag doesn’t get linked?
#
[tantek]
[snarfed] indeed. I also noticed that Granary is converting mf2 h-entry hashtags slightly differently than the AS2 spec says to and I'm wondering if that's due to the original content, Masto compat, or some other reasons: https://www.w3.org/TR/activitystreams-vocabulary/#microsyntaxes
#
[tantek]
in short: the AS2 example shows the '#' as part of the 'name' of the tag, while Granary does not include the '#'
#
[snarfed]
huh ok!
#
[snarfed]
that's a non-normative section 🤷 but if you or anyone else want to experiment and you figure out that that fixes interop, I'll happily implement it!
#
[tantek]
sure, I'm still digging, I just noticed the difference
#
[tantek]
looks like granary is finding my tags, e.g. with stuff like this in the AS2 output: { "name": "IndieWeb:", "type": "Tag },
#
[tantek]
so what I don't know is what else is needed to get Mastodon to do something with them
#
[snarfed]
those are from p-category s in your post
#
[tantek]
right, my own p-category spans are leaving out the '#' so granary is literally doing the right thing there
#
[snarfed]
yup, but I could still special case that in BF if it fixes interop
#
[tantek]
I could include the '#' inside my p-category but not sure that would make any difference
#
[snarfed]
people did a fair amount of experimenting in that issue. we might be able to do more and figure it out. takes a bit of work to get set up to send custom AP activities, but definitely doable
#
[tantek]
eh, feels like it would be a weird hack for BF to turn p-category into a hashtag, that feels like a big assumption
#
[tantek]
like you've said, keep Bridgy simple
#
[snarfed]
yeah I'd figure out how to special case it to minimize surprise
#
[snarfed]
this feels less inventing something new and more generating the exact shape Mastodon needs
#
[tantek]
so if it means the publisher has to explicitly include the '#' for it to "work", i.e. opt-in to Mastodon auto-linking the hashtag to some sort of (perhaps local or federated hashtag result) then that might be ok too
#
[snarfed]
not my current priority, but happy to follow more experiments
#
[tantek]
did aaronpk ever get his own hashtags working inside Mastodon?
#
[tantek]
like do we even have one working example of IndieWeb -> ActivityPub -> Mastodon -> linked hashtag in display of post?
#
[snarfed]
iirc he said he HTML links them to his own site's hashtag search
#
[tantek]
right, I saw that in his AS2, what I don't know is what does Mastodon do with it?
#
[snarfed]
treats it like a normal HTML link, which it preserves
#
[snarfed]
but I think what people really want here is "Mastodon-native" linked hashtags, ie they link to that hashtag search inside the current instance you're viewing the post on
#
[tantek]
or maybe the presence of an explicit HTML link there prevents Mastodon from creating its own hasthtag link
#
[snarfed]
eh but BF's aren't linked and don't "work" either
#
[tantek]
we don't know if Mastodon wants to see a 'tag' 'name' that starts with '#' for example
#
[tantek]
we don't know if Mastodon needs to see a 'tag' with an explicit 'id' (whether it's a URL or not)
#
[tantek]
we don't know what will "trigger" Mastodon into creating that hashtag link
#
[snarfed]
first places I'd look are https://docs.joinmastodon.org/spec/activitypub/ and Mastodon issues
#
[tantek]
do we need to look at what AS2 Mastodon itself outputs for notes with hashtags, and then reverse engineer from that?
#
[snarfed]
yeah that'd work too
#
[snarfed]
(and check what people have already done in that BF issue)
#
[tantek]
because clearly Mastodon-to-Mastodon of notes with hashtags "works"
#
[tantek]
so I guess one step would be to find a Mastodon post with hashtag that is linking it as expected, then feed that permalink into granary to see what it decodes of the AS2 for that post permalink
#
[snarfed]
unrelated, fediverse reposts should now be sending webmentions, I fixed that yesterday
#
[snarfed]
still need to fix one last thing for them to show up in the dashboard
#
[tantek]
will the old ones show up too? or just moving forward?
#
[tantek]
the #indieweb tag in that post in represented in as2 as: { "href": "https://hachyderm.io/tags/indieweb", "name": "#indieweb" }
#
[tantek]
and yet when shown on xoxo.zone, that post links #indieweb to https://xoxo.zone/tags/IndieWeb
#
[snarfed]
right. the leading # is an interesting find!
#
[tantek]
so I could experiment with including the leading '#' and see if that's enough to trigger the Mastodon auto-linking of the hashtag
#
[tantek]
what's also interesting is that the content of that post in the AS2 includes an explicit hyperlink for that hashtag: <a href="https://hachyderm.io/tags/IndieWeb" class="mention hashtag" rel="tag">#<span>IndieWeb</span></a> .
#
[tantek]
yet that specific type of hyperlink is being rewritten by Mastodon to point to a local instance tag search instead!
#
[tantek]
when "rendered" on xoxo.zone
#
gRegor
[snarfed], aren't you supposed to be on vacation?? ;)
#
[tantek]
I feel like the right thing to do is to try these experiments atomically to see what if anything triggers the desired behavior in Mastodon
#
[tantek]
like try just adding the '#' but not a link
#
[tantek]
then try adding a link but not the '#'
#
[tantek]
then try adding a link with rel="tag"
#
[tantek]
then try adding a link with class="mention hashtag"
#
[snarfed]
gRegor I am! it's been great so far 😎
#
[snarfed]
yup, those experiments sound good
#
gRegor
even bridging on vacay :)
#
[tantek]
Ok I think I can do those experiments purely by changing what markup I output for my permalinks
#
[tantek]
and then if none of those work, then try combining some of them
#
[tantek]
do we have an IndieWeb search for hashtag results?
#
[tantek]
what is IndieWeb search
#
Loqi
IndieWeb Search is a search engine that indexes and provides a service to search for text in web pages and websites created by IndieWeb community members https://indieweb.org/IndieWeb_Search
#
Loqi
[preview] [aaronpk] You need to add a new property into the object that describes the tag. For example: ``` "tag": [{ "type": "Hashtag", "id": "https://aaronparecki.com/tag/indieweb", "name": "#indieweb" }] ```
#
[tantek]
!tell capjamesg have you considered adding explicit tag (i.e. p-category and u-category) indexing (and results) to your IndieWeb Search site?
#
Loqi
Ok, I'll tell them that when I see them next
#
[tantek]
gRegor, so that's not strictly true per the Granary example I posted ^
#
[tantek]
it does not have (nor seem to need) that "type": "Hashtag",
#
gRegor
The xoxo.zone one? it's not loading for me for some reason
#
[tantek]
all it has is { "href": "https://hachyderm.io/tags/indieweb", "name": "#indieweb" }
#
[tantek]
gRegor, it's semi-automatic, the link prefills the form for you. you still have to click the GET button
#
gRegor
Granary is just reversing from the post right? Doesn't really confirm the request that created the Masto post?
#
gRegor
Ah! thanks
#
gRegor
Interesting
#
[tantek]
gRegor, no it's not reversing anything, it's reading the as2 (via connect) from the post permalink, and then "simply" returning it. note the input= and output= is the same
#
[tantek]
via conneg--
#
Loqi
conneg has -22 karma in this channel over the last year (-28 in all channels)
#
[snarfed]
oh wait no sadly granary does convert to AS1 and then back to AS2, it doesn't pass through unchanged
#
gRegor
Are masto posts created with the same AS2 syntax? I literally don't know
#
[snarfed]
that would be nice, but not currently what happens
#
[snarfed]
you can fetch directly with conneg: curl -H 'Accept: application/activity+json' ...
#
[tantek]
lol snarfed I was assuming granary was maximally lazy 🙂
#
[snarfed]
this _is_ maximally lazy
#
[snarfed]
given the breadth of inputs and outputs
#
[snarfed]
code laziness, not CPU laziness
#
[tantek]
I thought it would short circuit
#
[tantek]
if input & output were the same
#
[snarfed]
PRs welcome 🤷
#
[tantek]
maybe that's a feature request 🙂
#
[snarfed]
although it's kind of useful to see what it does. if you want exactly what's at a given URL, I'm not sure why you'd pass it through granary 😆
#
[tantek]
to do the conneg of course 😄
#
[snarfed]
eh. curl -H then
#
[snarfed]
I refuse to paper over and apologize for the failing that is conneg
#
[tantek]
tl;dr: as2->as2 in granary may be lossy
#
[snarfed]
yes! * -> *
#
gRegor
so more like as2 -> as1.8
#
[tantek]
10% as2 granary tax?
#
[tantek]
[KevinMarks] is this a job for unmung? to extract as2/json from a Masto post permalink and then present that?
#
[tantek]
curl is not the greatest UI 😕
#
gRegor
type: Hashtag, href: url, name: #indieweb
bterry1 joined the channel
#
[tantek]
interesting, so it might be the: "type": "Hashtag"
#
[tantek]
or it might still be the '#' in the start of the name: "name": "#indieweb"
#
[tantek]
or it could also be the explicit URL in: "href": "https://hachyderm.io/tags/indieweb",
#
[tantek]
which Mastodon might be using as a case-insensitive "search" in the content, e.g. it is able to find "https://hachyderm.io/tags/IndieWeb" (note different capitalization of IndieWeb) inside the content property, and the dynamically replace that link with a *local* tags link for the current server, e.g. xoxo.zone
#
gRegor
Also as snarfed points out in that discussion, "Hashtag" isn't in the AS2 spec
#
[tantek]
if "type": "Hashtag" is truly required then there's not much we can do to make that work from the publishing side, we'd need an actual Bridgy Fed change. but the question then would be, what publishing signal should cause Bridgy Fed to pick that particular "type" for a tag / p-category / u-category?
#
[tantek]
from an h-entry spec perspective, we could say that any category property value starting with a '#' should be treated as a hashtag
#
gRegor
weeee
#
gRegor
$400M paid API business! Down the drain, wow.
#
[snarfed]
"hey I have a great idea, we need to make some money, let's charge people for our API! I can't believe we were giving this away for free. we're going to make a fortune! how did they not think of this before!"
#
starrwulfe[m]
Wow. Just….Wow.
#
starrwulfe[m]
It’s like watching your favorite hero turn to 💩 before your very eyes.
#
gRegor
So the `as:Hashtag` thing appears to be from Eugen in Mastodon, and there's an issue to add it to the ActivityPub spec, but appears no movement beyond that: https://github.com/w3c/activitypub/issues/235
#
Loqi
[preview] [cwebber] #235 Add a Tag type
#
gRegor
Which led to the much shorter issue, no activity since 2017: https://github.com/swicg/general/issues/6
#
Loqi
[preview] [Gargron] #6 Hashtag representation
#
gRegor
They appear to be a `Link` subtype, which explains the `href` not `id` in the AS2 I linked earlier
#
gRegor
Though I really wonder if Mastodon is using that `href` at all.
gRegor and bterry1 joined the channel
#
[aciccarello]
[benji] I noticed there's an unreleased fix I need on the `@remy/webmention` repo so I ended up publishing my fork under my username. Then I updated the netlify build plugin and published that fork.
IWSlackGateway, geoffo, gxt_, [KevinMarks], vilhalmer, Guest6 and [TMichelleMoore] joined the channel
#
[TMichelleMoore]
[tantek] Re: Hashtags. I am still experimenting with BridyFed and just add the hashtags into the e-content or p-summary. In my case it seems like they need to be high up in the first paragraph to push all of them. I haven’t quite mastered how to push the full content. Sample here: https://fed.brid.gy/r/https://tmichellemoore.com/blog/project-journal-changing-sharepoint-url-fail-again/
[snarfed] joined the channel
#
[snarfed]
whoa [TMichelleMoore] you got it to work! you're the first one, none of the rest of us had figured it out yet. awesome, congratulations! ie the hashtags on https://indieweb.social/@tmichellemoore.com@tmichellemoore.com/109805395023360482 are correctly linked to indieweb.social tag searches
#
[snarfed]
could you post that example and your notes on https://github.com/snarfed/bridgy-fed/issues/45 ?
#
Loqi
[preview] [EdwardHinkle] #45 Post with hashtag doesn’t get linked?
#
Loqi
[preview] Project Journal: Changing SharePoint URL – Confirmed the SharePoint Online Management Shell Doesn’t Fully Work on a Mac
#
[TMichelleMoore]
[snarfed] I wish I could take that honor. 😊 It’s the fake way. I type them in. They aren’t coming from my WordPress post tags.
#
[snarfed]
that's fine, we're not talking about WordPress here. we're talking about getting hashtags in Bridgy Fed posts to "work" in Mastodon, ie link to searches for them
#
[TMichelleMoore]
[snarfed] Ok then I take the honor. Lol Hope you had a great vacation!
jonnybarnes, bterry1, AramZS, [dave], geoffo and [aciccarello] joined the channel
#
[aciccarello]
[TMichelleMoore]++ Nice investigative work!
#
Loqi
[TMichelleMoore] has 2 karma in this channel over the last year (8 in all channels)
[tantek] joined the channel
#
[tantek]
[TMichelleMoore]++
#
Loqi
[TMichelleMoore] has 3 karma in this channel over the last year (9 in all channels)
#
[tantek]
oooh it might be rel="tag"
#
[tantek]
without any changes needed in BF
#
[tantek]
that would be kinda amazing
#
[tantek]
no wait, those are for the WP categories
#
[tantek]
ok I have no idea, maybe the plain text without any markup around it "#hashtag" is enough for Mastodon to link it? less is more?
#
[tantek]
tried to read it via https://xoxo.zone/@tmichellemoore.com@tmichellemoore.com/109805395023360482 but maybe I have to convince [KevinMarks] to follow @tmichellemoore.com@tmichellemoore.com from his xoxo.zone account in order to view without redirects
#
[snarfed]
If you're not logged into an instance, you can still search for a BF user's profile, then click through to a post that way to see it
#
[snarfed]
URL will be the same but navigating like that keeps you in their UI, due to jsdr
#
[KevinMarks]
Ah, I follow Michelle on 2 mastodon servers, hang on
[schmarty] joined the channel
#
[schmarty]
yeah it's interesting that following the permalink is different from using the search. used that to test my own hashtag-in-content on indieweb.social. (i'm just plaintexting `#indieweb` and of course that is not working)
#
Loqi
[preview] Project Journal: Changing SharePoint URL – Confirmed the SharePoint Online Management Shell Doesn’t Fully Work on a Mac
#
[tantek]
works for me now [KevinMarks]. thanks!
gerben joined the channel
#
[tantek]
[schmarty] what's your example that is not working?
[benji] joined the channel
#
[benji]
[aciccarello] I pushed the test changes to my fork too. I need to checkout the netlify webmention plugin since that might fit in better with my deploy workflow
sebbu2 joined the channel
#
[schmarty]
ooh it's also doing something weird with my transcript iframe, lol.
[manton] joined the channel
#
[TMichelleMoore]
[KevinMarks] I am trying ActivityPub also. That’s why there are two.
#
[KevinMarks]
I found four
#
[aciccarello]
[benji] I also have an idea to parse the feed file pre-build in the netlify plugin to determine how many posts to send webmentions for https://github.com/CodeFoodPixels/netlify-plugin-webmentions/issues/4
#
Loqi
[preview] [aciccarello] #4 Check pre-build feed to determine how many posts to update
#
[aciccarello]
I'm hoping we can get some more community engagement around these packages because they could really help the static site webmention story if some rough edges are cleaned up
#
[benji]
I do something similar to this in a not very clean way. I have a github action that keeps a cache of the last item checked and whenever doing a deploy, it goes through until it hits that limit
#
[aciccarello]
Interesting 👀
gRegor joined the channel
#
[aciccarello]
Since the netlify plugin already knows where the feed file is, it should be able to look for changes. But I don't know what edge cases could come up.
#
[aciccarello]
The nice thing about the netlify plugin is that it doesn't rely on a separate service being up and running 😁
#
[aciccarello]
It'd also be good to get that plugin into the webmention.app docs
#
[tantek]
[TMichelleMoore] it looks like you are using both Bridgy Publish to POSSE to Mastodon, and Bridgy Fed to federate to Mastodon (both links are in your post), and that example post of yours is truncated with a link to the original on your site in the post content! That makes me think it was posted via Bridgy Publish rather than Bridgy Fed
#
[TMichelleMoore]
[tantek] I am using all three and trying to decide which I want to settle on. So the link I posted was from BridgyFed. Each of these works a different way and I am just trying to decide which I like best. But also trying to see what the correct microformats are to make it publish what I want. So I figured out that I have to put the tags earlier in the post and am not sure if a character limit is the reason they sometimes
#
[TMichelleMoore]
don’t show up in the Bridgy’s. Being a happy go lucky trying to understand how all of this works, can I digress and complain that I am disappointed that the standards aren’t all standards. I digress though. Lol I will post an example of all three.
#
[tantek]
[TMichelleMoore] the other things that are very different in your post https://xoxo.zone/@tmichellemoore.com@tmichellemoore.com/109805395032427309 vs other posts the rest of us are attempting is that the original is an *article* with an explicit p-name instead of a *note*, and it looks like your plain text *summary* property is getting sent to Mastodon instead of your HTML *content* property.
#
Loqi
[preview] Project Journal: Changing SharePoint URL – Confirmed the SharePoint Online Management Shell Doesn’t Fully Work on a Mac
#
[TMichelleMoore]
[tantek] That link is interesting. I think you all were discussing this a few days ago that it is not your link sometimes, but the link of your Mastodon server. I haven’t figured how to get the whole post over there with BridyFed. I have read the docs and tried different classes and haven’t succeeded. But then your WHOLE posts are showing including the previous and next and related links. What structure of h- e- and p-
#
[TMichelleMoore]
classes are you using? I would like to try them on one post using all three publishers.
#
[tantek]
I shared that link because it shows that your hashtags are linked in that post to the local instance's tag results.
#
[tantek]
If your goal is to "get the whole post over there" then you need to post notes instead of articles. Everything else works as a consequence of that (except hashtag local links, until we figure that out)
#
[tantek]
Who had the example of a plain text (no source markup not even a span) #hashtag not being linked when federating to Mastodon?
#
gRegor
The hashtag in the content didn't link within Mastodon, though I knew it wouldn't at the time
#
Loqi
[preview] [gRegor Morrill] COVID transmission is still high around the US and we need masks to protect our most vulnerable in healthcare settings. Help us protect those who need it most by telling your governor to #KeepMasksInHealthcare: Learn More and Send a letter: Keep Mas...
#
[tantek]
Do you have a Mastodon local instance link for that? E.g. like the XOXO.zone link I shared above for [TMichelleMoore]'s post
#
Loqi
[preview] COVID transmission is still high around the US and we need masks to protect our most vulnerable in healthcare settings. Help us protect those who need it most by telling your governor to #KeepMasksInHealthcare: Learn More and Send a letter: Keep Mask...
#
[TMichelleMoore]
[tantek] I searched Slack for hashtags to see if I could find the answer to who had the plain text source markup. Didn’t find it. But boy has there been a lot of conversation about hashtags!
#
[tantek]
gRegor++ yes those two links demonstrate that plain text hashtags inside an e-content are insufficient for Mastodon to link them
#
Loqi
gRegor has 27 karma in this channel over the last year (86 in all channels)
bterry1 joined the channel
#
gRegor
We already knew that from the examples in the BF github issue
jeremycherfas joined the channel
#
[tantek]
I've gotten a bit lost in that BF github issue thread
#
gRegor
Fair, several ideas bumped around and tried in there that seemed might work, but ultimately didn't.
#
gRegor
I'm leaning towards `type: "Hashtag"` in the tag object being the trigger. Am curious to see what Bridgy Publish to Mastodon is using since it seemed to work there (vs Bridgy Fed)
#
gRegor
I can summarize from chat and include some links in a new comment on that issue
#
[TMichelleMoore]
All, I tested out posting three ways Brid.gy Fed.Brid.gy and ActivityPub. I tried to copy the classes from [tantek]’s post and I am not sure if I actually setup the groups/divs the same way. ActivityPub did pull the native tags into the post in the way I would have expected in Brid.gy and ActivityPub not in Fed.Brid.gy. But Fed.Brid.gy did before.
#
[tantek]
gRegor, seems like this (what works and doesn't work) would be better captured in a "Hashtag support" section on /Mastodon rather than a GitHub issue
#
[tantek]
That way we (and future folks) can collaboratively edit / update it with more information instead of having to wade thru a thread of comments
ben_thatmustbeme joined the channel
#
gRegor
I'm really just focusing on what AS2 request does BF need to make