#dev 2020-06-26

2020-06-26 UTC
#
KartikPrabhu
what's "resolve" in this context?
#
KartikPrabhu
check that the URL does actually mention the target?
hs0ucy and geoffo joined the channel
#
jacky
KartikPrabhu: nah so like in the case of syndication-based Webmentions; I use those values to determine the 'result' of a Webmention (or a syndication)
#
jacky
so like if it's not provided, I just rely on the target as the 'result'
#
jacky
but if a location _is_ provided then I do some more sniffing (is it a synthetic page? bridgy-esque, etc)
#
jacky
there's some stuff in the /Webmention-brainstorming page that's interesting for use
#
jacky
this is the 'middle ground' I've come to avoid writing custom code for bridgy but also letting webmention-based syndication be a thing
#
KartikPrabhu
yeah I don't dededup the backfeed on my site yet.
#
jacky
which begs another question; should we consider having syndication services in the indieweb that edit posts with syndication links versus this method
#
jacky
oh de-duplication of backfeed is a whole different beast
#
jacky
and I kinda don't want that to live in my site either
#
jacky
ideally(!!) I'd want a webmention server that has access to my contacts (or tbh just the ability to query _for_ one, not dumping a list) to see if the authors match and if so, to build a synthetic page that links to both pages (twitter, mastodon, etc)
#
jacky
there's a case to be made that syndicated content should be de-duped via the `syndication` property; which might be more efficient _and_ doesn't require contacts knowledge
[KevinMarks] joined the channel
#
[KevinMarks]
This is the opensocial problem deconstructed. There we delegated the 'who do I know?' problem to the hosting platform. Maintaining that individually is tricky
#
jacky
I don't _have_ to know them; I just want to see if the post is the 'same' and do a map-reduce against them
[tw2113], [chrisaldrich], gxt__, [tantek] and [georgenancejr] joined the channel
KartikPrabhu, moppy, dckc, hs0ucy, djmoch, djmoch_ and aegibson73 joined the channel
#
@aaronpeters
↩️ That is a good, basic starter repo. I've learned from @TheGreenGreek (e.g. her article about webmentions) and for @cdnplanet the key challenge was to generate pages like https://www.cdnplanet.com/compare/baishancloud/cdnetworks/ from the http://baishancloud.md and http://cdnetworks.md files ...
(twitter.com/_/status/1276454990610038792)
djmoch and [jgmac1106] joined the channel
#
[jgmac1106]
oohh unhangouts.mit.edu switched to jitsi and added a bunch of features people might like...guess this could be meta or dev
KartikPrabhu, jeremych_, [jgmac1106] and dckc joined the channel
#
sivy
ahoi hoi
#
sivy
got my webmention PTD working as well as I can expect for now; now just need to solve storage
#
sivy
this is when my posts-as-markdown starts to breakdown
[KevinMarks] joined the channel
#
[KevinMarks]
Markdown can contain html. Put html in them
#
[KevinMarks]
(I have done this in Hugo - front matter + html for the post)
geoffo joined the channel
#
petermolnar
I have an interesting problem: I have a thick RSS feed, in which the description is my post content, the same as the e-content is. However... the e-content does not contain either the summary or, and this is the bigger problem, the in-reply-to link, if the post is a reply. I wonder, how are you people doing it?
#
aaronpk
Im not sure what this problem has to do with RSS?
#
petermolnar
it's not in particular to RSS, fair point; any feed would have the same issue
#
petermolnar
with the potential exception of a h-feed
#
sknebel
petermolnar: you could look at what granary does. if I remember right, when it turns h-feed into atom or rss it generates some additional contant
#
sknebel
*content
#
sknebel
based on the mf2 properties
#
[KevinMarks]
Well, you may want to make an atom content that contains more than an h-feed content.
#
sknebel
which is why if you follow aaronpks bookmarks feed you get a feed full of "<temperature>. Portland, Oregon"
#
aaronpk
Oh no lol
#
aaronpk
I guess I only expect people to follow my articles feed via RSS so I haven't put much thought into what the other kinds of posts look like in RSS
#
sknebel
or at least you did - seems like its not like that anymore actually
#
aaronpk
I recently switched to generating my own atom feed for my articles, I wanted to have more control over what's in it
#
[jgmac1106]
I think I want a Browser extension that if a post has a dt-published and it is over a year old I get a little pop up warning
#
aaronpk
lol nice
#
petermolnar
if I'm correct, granary adds <thr:in-reply-to ref="" href="in-reply-to-url" type="text/html" /> to atom outputs, with xmlns:thr="http://purl.org/syndication/thread/1.0", which I'm fairly certan no reader app will use or show
#
sknebel
hm, ok. then I misremembered, I thought it did some form of "i nreply to <link>" text thing
wombelix, djmoch, [tantek], b3u, [Ana_Rodrigues], theorbtwo1, [jgmac1106], [schmarty], [chrisaldrich], gRegorLove, nickodd and [fluffy] joined the channel; nickodd left the channel
#
aaronpk
does it have a title?
#
[fluffy]
titles aren’t allowed on notes?
#
aaronpk
more like if there is a title then it is an article
#
jacky
yeah that effectively makes them a article, no?
#
jacky
what is post type discovery
#
Loqi
Post Type Discovery specifies an algorithm for consuming code to determine the type of a post by its content properties and their values rather than an explicit “post type” property, thus better matched to modern post creation UIs that allow combining text, media, etc in a variety of ways without burdening users with any notion of what kind of post they are creating https://indieweb.org/post-type-discovery
#
[fluffy]
Titles are kind of fundamental to publ items 😛
[snarfed] joined the channel
#
[snarfed]
question is maybe more, which takes precedence in PTD, RSVP or article
#
aaronpk
also this event doesn't show RSVPs because there is a ticket URL. it'll just add the "RSVP" marker on comments
#
[fluffy]
I’ll need to figure out a reasonable way to decide when not to show p-title I guess
#
[fluffy]
yeah I was trying to have it show up as a comment with ‘attending’
#
[fluffy]
like all of the other reactions
#
aaronpk
usually if the user doesn't enter a title that's when you don't show a title :)
#
[fluffy]
yeah but Publ always has a title, even if it’s just inferred
#
[fluffy]
it needs something to put into the atom feed, after all 😛
#
aaronpk
no it doesn't :)
#
[fluffy]
then what’s a feed reader supposed to show?
#
aaronpk
nothing
#
aaronpk
i'm pretty sure we have examples of this
#
[fluffy]
FeedOnFeeds will not have a good ux for a title-less entry.
#
aaronpk
that's the rss reader's problem
#
[fluffy]
okay so what about things that convert, say, rss to imap? what are they supposed to put in Subject:?
#
[fluffy]
I maen I know subject isn’t required either
#
[fluffy]
okay as a temporary hack I’ve made it not set p-name on a title starting with “Re:”
#
[fluffy]
the PTD page implies that rsvp should override article though
#
aaronpk
so heh
#
aaronpk
i went a slightly different route with handling responses on meetable
#
aaronpk
responses may appear in more than one place on meetable events
#
aaronpk
like if you post a photo reply with a comment, it shows up in both the photos section and the comments section
#
aaronpk
so i deviated from the post type discovery algorithm in order to do that, otherwise it would appear in just one place
#
[fluffy]
That still doesn’t explain why my rsvp post didn’t appear as an rsvp at all though.
[chrisaldrich] joined the channel
#
[fluffy]
also now that I’ve suppressed p-name on this one, it’s showing up as a comment, but twice, and with a lot of extra whitespace
#
aaronpk
there is no rsvp section on this event
#
aaronpk
because there is a ticket url
#
aaronpk
there's a bunch of newlines and spaces in the parsed HTML of the post "\n\n\n \n \n "
#
Loqi
[fluffy] 📅 RSVP: yes I’ll have to make some food tickets to hand to my cats or something.
#
[fluffy]
yeah I was looking at that already
#
[fluffy]
why would newlines come through when it’s in e-content?
#
aaronpk
i'm not sure why it appeared twice, looking into that now
#
[fluffy]
IMO it should be treated as HTML, not plaintext with added HTML inside
#
aaronpk
space handling in responses is reaaaaaly tricky
#
aaronpk
everyone is sure their own interpretation of what it should do is correct
#
aaronpk
and always causes edge cases compared to other people's sites
#
aaronpk
[fluffy]: ah the URL of your post changed so it appears as a new reply
#
[fluffy]
but both replies show it as the new URL
#
[snarfed]
ugh yeah i have spent way too much time on whitespace handling in granary/bridgy
#
[fluffy]
and yeah the URL changed because it’s tied to the title by default :P
#
[fluffy]
the slug can be overridden but I rarely do that
#
aaronpk
i see two separate posts on your site
#
Loqi
[fluffy] 📅 RSVP: yes I’ll have to make some food tickets to hand to my cats or something.
#
aaronpk
they don't redirect
#
aaronpk
if one redirected to the other then i could dedupe that
#
[fluffy]
the latter redirects to the former
#
aaronpk
not according to my browser
#
aaronpk
oh now it does, is there some caching going on?
#
[fluffy]
on your browser maybe 😛
#
aaronpk
"Cache-Control: max-age=3593" so i guess the browser will cache it for an hour
#
[fluffy]
oh, yeah, I also use etags etc. but those things interact weirdly
#
aaronpk
did you send a webmention from the previous URL when you updated the URL?
#
[fluffy]
if pushl detects a URL change it sends a mention from the old URL as well as the new one, so that the 301 gets handled by the webmention endpoint
#
aaronpk
ok then i should be able to handle that
#
aaronpk
this is really tricky to handle on the receiving end because the webmentions can come in any order
#
aaronpk
i think i have this working on my website but not in meetable
#
[fluffy]
but also I want to point out that both of the comments are coming from the updated URL
#
aaronpk
well it's showing the "u-url" property
#
Loqi
[fluffy] 📅 RSVP: yes I’ll have to make some food tickets to hand to my cats or something.
#
aaronpk
so it got the update from the old URL and processed the update appropriately
#
[fluffy]
the two hardest things in software engineering: naming things, cache invalidation, and off-by-one errors
#
[fluffy]
the old URL should have included a 301 to the new URL though?
#
aaronpk
yeah i think i need to actually save the final URL in the redirect instead of using the source URL from the webmention request
#
[fluffy]
I can’t think of how Publ would have served up the old URL as not-a-301 while still sending an updated u-url
#
[fluffy]
I mean, not in this case. there’s a path where it CAN happen but you have to do that manually 😛
#
[fluffy]
yeah the webmention validation spec at least implies that it’s up to the endpoint to chase the 301 chain
#
[fluffy]
or at least that’s my recollection, based on that being the only thing that makes sense 🙂
#
aaronpk
yep that's what's missing
#
aaronpk
i think i have a fix
#
aaronpk
ok this is an easy fix if the webmention from the old URL arrives before the new URL
#
[fluffy]
but anyway back to the original issue, since p-name is the lowest-priority detection criterion for “this is an article,” shouldn’t meetable always treat it as lower priority than all the other things it could be? or do I need to manually set in-reply-to here?
#
[fluffy]
I can’t guarantee the order that URL update mentions come from pushl 😞
#
aaronpk
however if the webmention from the new URL arrives first then it's harder
#
[fluffy]
pushl’s just like “oh hey there’s all these URLs in the feed, oh the feed also used to have these URLs let’s send updates in case it disappeared because of a move”
#
aaronpk
have we documented how to do this anywhere?
#
[fluffy]
I would think that the order shouldn’t matter though? Like, you get an update to the new URL, then you get an update to the old URL and then see, oh, these URLs are the same, let’s remove the old URL.
#
aaronpk
that last part
#
[fluffy]
I know it’s tricky and fiddly though
#
aaronpk
ok so i'm thinking this through
#
aaronpk
i need logic that works regardless of whether we're handling the webmention from the old or new url
[JuJu] joined the channel
#
aaronpk
if the source URL redirects, then... if the source URL previously existed then update the storage to reflect the new URL
#
aaronpk
does that cover it?
#
[fluffy]
I think so?
#
[fluffy]
I mean you’ll probably need to worry about how to handle storage collisions in that case
#
[fluffy]
which I guess depends on how your database layer looks
#
aaronpk
so the new source URL comes in, there's no record of it yet, so it adds a new record
#
aaronpk
then the old source URL comes in, it sees it's a redirect, it sees that it's already in storage, and checks if the new URL exists
#
aaronpk
there we go
#
[fluffy]
yeah that makes sense
#
aaronpk
ok let's give this a shot. i'm going to delete your responses and send webmentions for them manually if you don't mind
#
[fluffy]
go ahead
#
[fluffy]
Meanwhile I”m still trying to figure out if I should be suppressing p-name on my end or just leaning on the fact that PTD says that p-name is the lowest-priority criterion regardless of how many things match 😉
#
[fluffy]
also fair warning, the URL’s probably going to be changing back to the old one, which will at least be another fun test 🙂
#
[fluffy]
Okay I’m suppressing p-name on note entries, and also changed the URL back, and now I’m seeing the old URL be the duplicated thing.
[schmarty] joined the channel
#
Loqi
Home / Articles / In Defense of a Fussy Website Avatar of Sarah Drasner Avatar of Sarah Drasner Author Sarah Drasner Comments Start Conversa...
[tantek] joined the channel
#
aaronpk
okay i think i finally fixed the logic on handling updated source URLs
#
[fluffy]
hmm, i also notice that my hcard image isn’t appearing on my response like it is for others
#
[fluffy]
or any of my hcard stuff, for that matter
#
aaronpk
let's see
#
aaronpk
first glance at the parsed mf2 looks fine
#
aaronpk
xray thinks it's fine too
#
aaronpk
it's even stored in the database
#
[fluffy]
Also I suppose I should put my p-rsvp outside of e-content
#
aaronpk
tricky
#
aaronpk
i should handle this better heh
#
aaronpk
it was smart enough to match up your RSVP with your user account on meetable (which is how it does things like dedupes an indie RSVP post and if you also click the RSVP button on the interface for events that have it)
#
aaronpk
normally the h-card on your home page will take priority over anything that comes in via webmention
#
aaronpk
and it didn't find an h-card on your home page, and it's mistakenly then not using the author info from the post
#
aaronpk
Anyway I'm fixing that now
[Cal_ThreadRead] and [chrisaldrich] joined the channel
#
[fluffy]
Hmm, my homepage should have an h-card on it too.
#
@yenzie
Hey, @brianwisti, just wanted to say that there was a lightning talk about webmentions at #TPRCiC And there was a screenshot/example. And you were right smack there. And for a moment, all was right with the world.
(twitter.com/_/status/1276647997267419138)
#
[fluffy]
It’s possible I lost that in a template refactor though.
#
aaronpk
let me fix this first :)
#
aaronpk
i also can't remember if it checks only the first time it sees you or checks again periodically
#
[fluffy]
Pin13 isn’t finding it either :)
#
[fluffy]
And yeah I’m taking a walk right now, don’t worry about me touching my templates are the moment :)
#
[fluffy]
Yeah I’m definitely including my h-card but it’s sitting on its own, not part of an h-feed or h-entry or whatever.
#
[fluffy]
I see a potential problem is that it’s declared as h-card p-author even when it’s top-level on the page. I assume that’s messing something up.
#
[fluffy]
mf2’s nesting rules never made a lot of sense to me.
#
aaronpk
it takes a while to get used to then it makes sense
#
gRegorLove
not sure if related but I don't think events.indieweb.org has latest Xray, that's why it's not getting my (weird) homepage h-card on my responses
#
aaronpk
no it's got the latest
#
aaronpk
ok this is the same thing
#
aaronpk
it is incorrectly prioritizing your user record instead of the data from the post
#
aaronpk
wish i had some tests for this, this is more complicated than it sounds
#
aaronpk
ok pushed a fix, going to spot-check a few pages
#
gRegorLove
my photo's showing now, woo!
[KevinMarks] joined the channel
#
Loqi
ok, I added "https://www.wired.com/story/sustainable-software-design-climate-change/" to the "See Also" section of /green_computing https://indieweb.org/wiki/index.php?diff=70597&oldid=70555
#
@brianwisti
↩️ *looks at the uploads list* @JmacDotOrg I assume. I mean yeah who is the likeliest "webmentions talk at a perlish conference" person.
(twitter.com/_/status/1276655946375127040)