#dev 2020-07-18

2020-07-18 UTC
[tantek] joined the channel
#
@TomLisankie
↩️ Related, came across this last night and somehow didn’t know it existed. Webmentions, it’s an open backlink/trackback protocol https://webmention.net
(twitter.com/_/status/1284295015427117057)
gRegorLove, [Murray] and jackyonamacbook joined the channel
justache joined the channel
#
jackyonamacbook
oy, another moment where I'm feeling that wiki is good for history but _not_ for capturing dev information tbh
#
jackyonamacbook
like I was wondering what's the accepted set of params for `q=source` and the only one "approved" is `url`. Which is clear(ish) on the Wiki (I'm editing now) but the other options should be some how highlighted
[LewisCowles] joined the channel
#
Loqi
jacky has 30 karma in this channel over the last year (113 in all channels)
#
aaronpk
That's the opposite of what it normally is
#
aaronpk
and why we started moving discussions to github
KartikPrabhu, gRegorLove, nickodd, [tantek], [jeremycherfas], [chrisaldrich], [KevinMarks], tinfoil-hat, moppy and [Sadik_Shahadu] joined the channel
#
@AndreJaenisch
↩️ Personally, I'd like to see more people getting a homepage (and domain) of their own and interact with each other via Webmention, i.e. a revitalisation of federation of content. The WWW has the advantage of being open. Embracing semantics allow for building a knowledge graph.
(twitter.com/_/status/1284491416631160832)
ThatSummer[m] joined the channel
#
ThatSummer[m]
Ah, I've made it in. 🙂 Matrix is a bit weird about finding IRC chat rooms.
#
aaronpk
welcome :)
#
ThatSummer[m]
Thanks :)
#
ThatSummer[m]
So I'm making a GET request to an authorization endpoint with query params. In this case, the auth endpoint is: indieauth.com/auth. An example of the full request below:
#
ThatSummer[m]
This fails with an HTTP 400 Bad Request but it doesn't say much beyond that. I looked at the spec and this seems to be correct - https://indieauth.spec.indieweb.org/#authentication-request
#
aaronpk
did you read the error?
#
aaronpk
this is a link you'd redirect the user to in their browser, so the error message is printed on the page there
#
ThatSummer[m]
Oh I see! I was working on the server side for this (and I thought that was the correct approach) but let me revisit things in that case.
#
ThatSummer[m]
Opening that link the browser says redirect_uri isn't specified... which is correct as I had specified it as "redirect_id" :(
#
ThatSummer[m]
My bad!
#
ThatSummer[m]
Anyway thank you! :)
#
aaronpk
no problem! easy fix!
#
ThatSummer[m]
Yes :D
nickodd, [snarfed], [tb] and [fluffy] joined the channel
#
GWG
If I have an array of key value pairs, and the keys are delimiter separated... example key being a:b:c...and I want to turn it into a multidimensional array, what is the most efficient way to do so in PHP? I feel like I could optimize this somehow
#
GWG
aaronpk: Someone's mixing it up again
[Cal_ThreadRead] and [chrisaldrich] joined the channel
#
[tb]
[aaronpk] Do you have any plans right now for an omniauth-indielogin gem?
#
Loqi
[aaronpk] omniauth-indieauth: IndieAuth strategy for OmniAuth
#
aaronpk
that's actually an indieauth.com gem
#
aaronpk
(you can choose which to use, but it's not actually doing the indieauth spec)
#
[tb]
Ah gotcha. Spelunking through the source for omniauth-indieauth, it looks like it's actually _mostly_ compatible for the request/callback phases, other than the hard-coded `/sign-in` path segment here in the initial request—which looks from the IndieLogin docs like it would just need to be `/auth` instead
#
aaronpk
i don't do much ruby stuff anymore so i'm happy to turn it over
#
aaronpk
it needs some updates to discover the user's authorization endpoint
[tw2113] joined the channel
#
[tb]
Aha — well maybe I'll take a stab at it here once I get a bit further along on this project then!
#
aaronpk
that'd be great
#
aaronpk
most of the request/redirect code there should still work fine, just needs some way to do the auth endpoint discovery
#
[tb]
What are you referring to as the user's authorization endpoint in this case? (Sorry still catching myself up on the full spec here)
#
aaronpk
the user enters their URL, their URL has a `<link rel=authorization_endpoint>` tag which points to their authorization endpoint
#
[tb]
Ohh I see now. I think the full connection/difference between IndieAuth/IndieLogin is clicking now
#
@1Br0wn
Thanks to @threadreaderapp’s brilliant new auto-blogging feature for threads, here’s my first automated post! (Thanks also for all their help in getting the authentication working, and #IndieAuth too.) https://www.ianbrown.tech/2020/07/18/38/
(twitter.com/_/status/1284555114137751560)
#
[fluffy]
@gwg If you don’t need escaping of the delimiter, look at https://www.php.net/explode
#
[fluffy]
oh wait you said multidimentional, hmm
#
[fluffy]
Could you provide a fuller example of what you intend for input and output?
#
aaronpk
[snarfed] would you consider adding support for webmention status feedback in bridgy? where you'd be able to show the final status of the webmention that the receiver reports? happy to negotiate what the details of that would actually look like
[snarfed] joined the channel
#
[snarfed]
aaronpk it's already there! via custom mf2 properties on user pages. https://brid.gy/about#api
#
[snarfed]
you have to do a bit of bookkeeping to find the specific wm you're interested, but it's doable
#
aaronpk
no i mean showing data past the point of the http response of the webmention endpoint
#
aaronpk
for webmention receivers that process asynchronously
#
[snarfed]
ohh i see, the opposite direction. hrm. maybe
#
Loqi
[incanus] #158 hosted service not showing all mentions?
#
[snarfed]
would add a lot of additional polling
#
[snarfed]
easy start would be to link to the status page, if available, and maybe render async different from sync
#
aaronpk
i'm not saying *how* to do this yet
#
[snarfed]
lol ok then...
#
aaronpk
but curious if you'd be interested in exploring it
#
aaronpk
the problem is right now all bridgy can show is that sending the webmention worked, which doesn't actually tell the user whether it was successful
#
[snarfed]
also do we have enough consistency in the wild with wm receivers returning 200 vs 201 vs 202 correctly semantically?
#
[snarfed]
yeah i understand
#
aaronpk
i don't know, we'd need to explore that
#
aaronpk
the other thing we could do is a callback url where the webmention receiver could post back to bridgy to report the status
#
[snarfed]
that would have been a great indiemap extension, send every site a wm and see how it behaves
#
[snarfed]
ugh yeah, i just know we'd get like 1-5% adoption of anything new/custom like that
#
aaronpk
well, if it helps the large number of people using both webmention.io and bridgy, it might still be worth it
#
[snarfed]
so yeah this is all totally doable, i don't know if we need too much "proof of concept" to really validate the feasability
#
aaronpk
i'm certain justin would have been able to troubleshoot this himself if this information were better surfaced
#
[snarfed]
the q's in my mind are more around, what's the behavior range of wm receivers in the wild, how often will we get false positives/negatives/breakages from this, etc
#
aaronpk
i'm not eager to make bridgy do yet more polling, so i'd definitely be happy to do a push-based approach instead
#
[snarfed]
do we have a de facto standard for even detecting a status page? 202 + Location response header?
#
aaronpk
in which case the http response code isn't really relevant to this
#
aaronpk
bridgy could send another url along with source & target, and webmention.io could post back to that when it's done
#
[snarfed]
eh yeah but polling a Location header is at least somewhat converging on a de facto standard
#
[snarfed]
i'm especially reluctant to make up anything new or bridgy-specific
#
aaronpk
it'd be a webmention extension
nickodd left the channel
#
aaronpk
i think there's already some notes on this on the wiki
#
[snarfed]
yeah i'm somewhat open to this then
#
[snarfed]
usually i try not to lead w/bridgy, but if the counterpart is wm.io, you're right, it's big enough to qualify on its own
#
[snarfed]
or seems like a websub candidate? guess the tradeoff is, websub is standard, but it's heavier than we need here...but it's standard...but... 😁
#
aaronpk
websub isn't even quite enough anyway, still have to make up a payload
KartikPrabhu joined the channel
#
[snarfed]
eh it's enough to tell you to fetch and parse the status page, right? wm style
#
aaronpk
feels like adding a bunch of extra steps
#
[snarfed]
eh yeah it's the fat vs thin ping argument, right? and wm clearly landed on the latter
#
[snarfed]
simplest MVP (again) seems like a visible status icon in bridgy user pages next to pending async wms, with a link to the status page
#
[snarfed]
heads off to see how common wm.io is in indiemap
#
aaronpk
technically status pages are also a not-yet-standardized experiment
#
aaronpk
i'm not even sure how many webmention receivers support them
#
[snarfed]
but it's the closest common thing we have already in the wild
#
[snarfed]
so it seems a bit better than making up something entirely new?
#
aaronpk
yes if: there are implementations other than mine, and there aren't false positive cases
#
[snarfed]
time for a webmentionmap
#
aaronpk
ah i forgot the possibility of status pages are mentioned in the spec https://www.w3.org/TR/webmention/#receiving-webmentions
#
aaronpk
tho the contents are not specified
crazed joined the channel
#
aaronpk
wonders if telegraph has any logs of what webmention endpoints have returned to it
#
[snarfed]
still, something!
#
aaronpk
oh hey telegraph is coming up on 1 million sent
#
aaronpk
ah yes i forgot bridgy is the false positive here
#
aaronpk
(bridgy publish)
#
Zegnat
I feel like the trickiest part with status pages is whether you go machine or human first. A webmention sender built into a CMS may want some machine readable answer. But if a human used a web form to submit a comment URL on a blog post they would prefer to get HTML.
#
aaronpk
Zegnat: yes and i think webmention.io status pages support conneg for that
#
aaronpk
bridgy publish returns the resulting silo URL in the Location header, which looks like a webmention status page
#
Zegnat
conneg++ (although I may be in the minority liking it :P )
#
Loqi
conneg has -4 karma over the last year
#
aaronpk
which i suppose isn't terrible, because the webmention sender would end up linking to the POSSE copy in the "status" button
#
Zegnat
Ah, right, services that trigger something based on webmentions would be different than regular webmentions
#
aaronpk
(and i misspoke earlier, telegraph has *attempted* to send almost 1 million, not actually sent)
#
[snarfed]
huh, only 204 out of 2700 sites in indiemap are (were) on webmention.io
#
[snarfed]
a lot, but less than i expected.
#
aaronpk
that is less than i expected too
#
[snarfed]
oh, out of 882 total that have a wm endpoint
#
[snarfed]
415 on Known, 314 on WP
#
[snarfed]
oh and conneg-- out of pure spite
#
[snarfed]
and huh i'm surprised you used conneg for wm.io's API instead of mf2
#
[snarfed]
but 🤷‍♂️
#
aaronpk
so 23% webmention.io, 47% known, 35% wordpress
#
[snarfed]
with possible overlap
#
aaronpk
(if i use mf2 i have to make up a mf vocab)
#
[snarfed]
make up but not standardize
#
[snarfed]
pronounced "yolo"
#
[snarfed]
also excuse me patting myself on the back here to say, thank god, it doesn't happen, but answering questions like "what fraction of the community is on wm.io" as data to help us make design decisions is *exactly* why i built indiemap
#
[snarfed]
only drawback is i do it too infrequently. ah well
#
aaronpk
i do feel like it's worth recrawling soon though
#
[snarfed]
go for it! :troll:
#
aaronpk
i can't even figure out how to run bigqueries
#
[snarfed]
lol aww it's just sql
#
aaronpk
i certainly have the bandwith at home to do a crawl
#
[snarfed]
but more importantly you can recrawl without touching bq
#
[snarfed]
yes! more about the time investment babysitting though
#
[snarfed]
ok how can we do a survey of wm endpoint behavior, 200 vs 201 vs 202, etc
#
[snarfed]
oh we could just send probe wms to every endpoint in indiemap!
#
[snarfed]
that's actually pretty manageable
#
aaronpk
is the status code relevant here tho? isn't the presence of the Location header enough?
#
aaronpk
like if someone returns a Location header but also sends 202 instead of 201, that's not valid HTTP but it'd still be fine to treat the Location header as a webmention status URL
#
[snarfed]
i guess? got me
#
[snarfed]
assuming it's actually a status page? and i guess it hopefully mostly will be?
#
[snarfed]
🤷‍♂️ 🤷‍♂️ 🤷‍♂️
#
aaronpk
with the relatively large exception of bridgy publish
#
[snarfed]
i bet wm.io + wordpress + maybe micro.blog will swamp all the others so this may not actually matter so much
#
aaronpk
i guess the false positive there would be a webmention endpoint that returns an HTTP redirect for some reason
#
aaronpk
but that'd be 3xx as well
#
[snarfed]
ah yeah but i was just thinking one probe per domain
#
aaronpk
i'm just looking thru telegraph logs, i have a column that stores the value in the location header
#
aaronpk
oh hey
#
aaronpk
telegraph already implements that callback mechanism described on the wiki
#
aaronpk
as does my website
#
[snarfed]
k here's all webmention endpoints in indiemap:
#
[snarfed]
for anyone who wants to do those probes
#
aaronpk
hm that link loads up a project in my own google console
#
[snarfed]
1122 total
#
aaronpk
do i need to get access to the indiemap data set somehow?
#
[snarfed]
project shouldn't matter. indiemap dataset is public
#
aaronpk
there's no project id in that URL so it defaults to the last project i opened
#
[snarfed]
or, if you run it, does it run?
#
[snarfed]
oh sorry let me edit the query to embed the project
#
aaronpk
no, it says the database doesn't exist on my project
#
[snarfed]
k, just a sec
#
[snarfed]
k, reload?
#
[snarfed]
er sorry wait
#
[snarfed]
ok now reload. project + dataset should be embedded now
#
aaronpk
ah if i click the link from indiemap.org then it loads that project
#
aaronpk
now that link says unable to load the query
#
aaronpk
i tried pasting it in and i get "Access Denied: Project indie-map: User does not have bigquery.jobs.create permission in project indie-map."
#
[snarfed]
ugh sorry! thanks for surfacing! fixing
#
[snarfed]
oh yeah maybe you do need to be in your own project
#
[snarfed]
for billing since indie-map doesn't let you bill your queries to it
#
[snarfed]
(they'll be free, but still)
#
aaronpk
oh i see
#
[snarfed]
or, i added some permissions, maybe it will work now as is
#
[snarfed]
worst case i'll just post the csv
#
aaronpk
gosh i have to go enable bigquery on my account first
#
[snarfed]
it may work in the indie-map project now
#
aaronpk
still no
#
aaronpk
ok of the status URLs i have logged in telegraph, they are only from either webmention.io, indienews, bridgy publish, lighthouse, and then there are three websites that return the target url in the location header for some reason
#
Zegnat
That sounds like a spec misinterpertation
#
[snarfed]
aaronpk do telegraph logs have http response code? i'm curious if the non-status page responses are 200, or at least non-202
#
aaronpk
sadly that is not logged
#
aaronpk
oh wait
#
aaronpk
for some reason it's logged in a different table!
geoffo joined the channel
#
aaronpk
one of them is 202
[tb], [tantek], [chrisaldrich] and [tw2113] joined the channel