angelo, pharalia, tei_ and Soni joined the channel
#[manton]gRegor: The Ruby gem. Actually looks like I’m on an older version, but quickly skimming the commit history I don’t think anything with this has changed. An exception is being thrown when using `URI`… e.g. `URI("mailto:asdfasdf")` will fail. Fix seems straightforward to catch the error and just ignore those URLs, but I haven’t looked closely.
#[manton]I’ll test and do a pull request when I have time.
#[jgarber]That’s proooooobably happening while trying to absolute-ize URLs…?
#Loqi[preview] [Shaun Harrison] What is the correct way to validate a user delete request in ActivityPub?Mastodon signs it with the key of the user being deleted, and when you request the key, it returns 410 so it's not really clear to me how you'd validate that signature.#activity...
#aaronpkIt does mean you have to store all keys, but that is also a good idea anyway
AramZS, [Jo], shoesNsocks and btrem joined the channel
#[tantek]speaking of caching, I'm curious what's the latest "best practice" for caching webmention endpoints, either from a particular URL or for a whole domain? Like I believe Bridgy does some degree of caching / inference of wm endpoints it has discovered, and AFAIK such behavior is beyond (outside the bounds of) the Webmention spec
#[tantek]I am particularly curious in the context of "large" systems that may want to "turn on" sending Webmentions, but would require them to do potentially LOTS of Webmention discovery traffic, perhaps repeatedly on the same URLs / domains for heavily "shared" links/domains
#[tantek]Two part question really: what are current Webmention senders doing in terms of caching discovered wm endpoints (either page or domain level caching or both) ?
#[tantek]and second: is there a way to indicate in your Webmention link rel that that discovery may be cached by the discoverer for some amount of time, like a week or a month?
#[tantek]and 2a: is there a way to indicate in your Webmention link rel that that discovery may also be re-used for OTHER permalinks (or your entire domain), and cached as such, for some amount of time?
#[tantek]^ obviously both of these questions could be applied to link rel discovery methods in general, however, Webmention is a good specific example of link discovery which has numerous implementations of varying scales that we can learn from
#[tantek]yes absolutely. you might edit the contents of a blog post in minutes certainly over hours. whereas it's very unlikely the wm endpoint for that blog post will change in minutes or hours.
#aaronpki'm curious if anyone has done that for other link values
#[tantek]it's something that overlaps both HTML and HTTP
#[tantek]aaronpk, I don't think anyone has done it for any other link rel discovery values in particular
#[tantek]some rel values, like "stylesheet" the consuming code has always already retrieved the source HTML, so there's no need for such a caching directive
#[tantek]other rel values, like most XFN values (i.e. all but 'me'), use-cases access them infrequently enough that no caching is needed
#btremFor favicon, why wouldn't you rely on the cache headers returned with example.org/favicon.ico? Same for manifest.json?
#aaronpkbecause those cache headers talk about the *content* of the icon, but we're talking about caching the location of the icon
#[tantek]favicon doesn't use rel discovery so it's inapplicable to this topic
#[tantek]again, this is about the link rel discovery step, not the retrieval step
#aaronpke.g. if someone's webmention endpoint is webmention.io, i'm not going to start returning a 301 redirect on that endpoint 😂
#[tantek]step 1 retrieve HTML, step 2 link rel discovery in that HTML to find a URL, step 3 process that URL. we are talking about step 2. http status codes, cache headers are about step 3
#btremSo the question is what happens when the page changes its endpoint. That seems like the same thing as when the page changes its content.
#Loqi[preview] [[tantek]] yes absolutely. you might edit the contents of a blog post in minutes certainly over hours. whereas it's very unlikely the wm endpoint for that blog post will change in minutes or hours.
#aaronpkbtrem: that was my first question, which tantek gave a good answer to there ^
#[tantek]while "technically" it's the same thing, bytes in the page change, in practice no it's not the same thing
#btremIf your page changes in minutes, and you expect a ua to retrieve a new copy (using e.g. cache-control: max-age: 120 etc.), is there a large cost to looking at the rel attributes again?
#aaronpkno this is about someone finding the webmention endpoint and wanting to cache it, e.g. the bridgy issue linked previously
#aaronpkthe consumer of the webmention link rel doesn't care about the rest of the content of the page
#btremI see. So the problem is how does an author control the cache for wm when using a third-party wm endpoint (like webmenion.io)?
#aaronpkthird party endpoints is probably the 80% problem, but it's not exclusive to that
#aaronpklike you can just change your own webmention endpoint URL within your own first party tooling whenever you want
#[tantek]btrem, see my steps 1,2,3 above. this is about step 2
#[tantek]"your page changes in minutes, and you expect a ua to retrieve a new copy" is about step 1
#sknebelalso "HTTP caching" has very limited meaning for API endpoints
#sknebelthere is no way for an endpoint to signal itself "please check if I'm still the right thing to use every X <time>"
#[tantek]also I don't believe you can meaningfully use that for the *existence* of the endpoint which is the problem we are trying to solve here, vs. the *results* of using the endpoint (which is what HTTP caching applies to)
#[tantek]so you aren't even allowed to cache "step 3" in those cases
#sknebelpost responses can be cached if explicitly indicated as such AFAIK, but its rarely implemented
#sknebelpotentially one could have a pattern to rerun discovery for a cached value if the endpoint starts to return errors, but that would mean the endpoint would need to stop working once it isnt responsible anymore. which means it'll go wrong in practice
#aaronpkthat sounds like activitypub account migration 😂
#sknebelquestion of the scope of caching is also fun. per-page? - limited use, but ok for things like bridgy probably. per-domain? likely to cause issues as soon as setup get a bit unique
gRegor joined the channel
#[snarfed]wish I could hang out for more of this conversation! sadly I'm afk for most of the day. all this ^ sounds reasonable so far. my one concern is, whatever mechanism we end up with, it may only see a small amount of adoption, like anything opt-in
#[snarfed]so, the one thing I'd ask for is a provision for _default_ caching, for wm receivers that don't specify this new caching mechanism
#[snarfed]eg by default, wm endpoints may be cached for 2h, per [domain or something]
#aaronpkif we end up with something like `<link rel="webmention" href="..." cache="30d">` i would be happy to add that with some reasonable default value to the webmention.io setup docs
#aaronpkultimately a webmention sender might decide to ignore the hint anyway, like bridgy might want to set its own minimum caching time to avoid someone saying only cache this for 1 minute or something
#[tantek][snarfed] agreed that we need to solve this even only for link rel discovery consuming code, without requiring a new mechanism for link rel discovery publishers
#[tantek]aaronpk, I like that use of "cache" as an attribute, presumably we can treat it similar to "type" on links which is advisory but not canonical
#[tantek]is there an existing cache time string format we can re-use for the attribute value rather than make up something new? e.g. the "type" attribute on link/a uses the same (or a subset of?) HTTP Content-Type
#[tantek]that looks oddly like iCal DURATION format
#[tantek]oof I had forgotten we asked for / proposed duration in HTML <time> as an option, and lacking anything better I'm fairly certain I would have referenced re-using iCal there
#[tantek]I think since this affects HTTP more than content semantics, I'd prefer to re-use HTTP cache header syntax than HTML time element
[jacky] joined the channel
#aaronpkis there anything in the set-cookie header that might use a duration syntax?
#[tantek]and should we use that same one attribute for generalizing discovery to other permalinks or the domain as a whole, or another attribute?
#[tantek]as in, yes you may cache this discovery for a week, vs you may re-use this discovery on other posts on this domain, or domain home page (or both) for a week
#aaronpki suppose the way to avoid the opt in problem is to instead recommend some default behavior for senders, and then if a publisher knows the default is wrong for some reason, can use the cache indicator to suggest an alternative
#aaronpklike if I know that bridgy (and most others) are caching a webmention endpoint for my whole domain for 24 hours, and I have a particular page where I want to use a separate special endpoint, I could add an attribute that says "actually don't use this endpoint for the rest of the domain"
#[tantek]yes, that *and* I believe POST can support redirect too right?
#[tantek]so even if a sender does use your default wm endpoint for a "particular page", you can redirect it serverside to the special endpoint as a repair action
#aaronpki forget the status code but one of them is meant for that, where the HTTP client is supposed to re-send the post body parameters to the new url
#aaronpkrather than the browser behavior which is to make a GET to the redirected-to location (like after you submit a form you get redirected somewhere)
#aaronpkin other news, i really want to figure out how to post 360 photos to my website
#aaronpkone problem with not having my own posting interface in my site is i have to first figure out how to represent things in microformats in order to make a micropub request to my site 😂
#[schmarty]I would also love to work up something for "animated GIFs" which are now best-practiced as videos with varying degrees of autoplay and loop counts allowed, and image fallbacks (and don't forget alt text)
#[schmarty]sknebel: to my knowledge Safari will do mp4s and that's it for browser support
#sknebelyeah, was just checking, seems that was a thing Safari just did and none of the other browsers liked
#[tantek]aaronpk, [schmarty] the answer to "how do I post a new type of thing" is the same as it ever was. Use the closest existing "generic" type for it and a hashtag, get experience publishing it, and then if there are multiple people doing so (with a consuming code use-case) we can figure out markup for interop
#aaronpkthe consuming use case is displaying the post in a reader or comment or reply context
#[tantek]if your goal is (primarily) your own implementation, using a hashtag to "subtype" should be sufficient for your code to detect and alter presentation accordingly
#[tantek]and if a hashtag is too intrusive, you can also find a suitable emoji. we've done some of that for e.g. /read posts
#[schmarty]microformats pedantry: do you mean a `category`? :}
#[schmarty]that approach is interesting for something like a "gif" - but also any video with a poster image or image fallback. i'd send `u-video` and `u-photo` (with `alt` on the `u-photo`?)
#[schmarty]bonus for "gif" is that the microformats consuming case is immediate: these are meant to be responses that show up on other folks' sites.
#[tantek][schmarty] yes a hashtag (human visible) marked up as a mf2 category 🙂
#[schmarty]aaronpk: i am interested in an mf2 client for posting panoramic images so i am happy to chat about it and maybe slap something together. i've been enjoying my recent ports of my bayside.pub micropub clients to PHP and i think micropubkit is near a good place to make it quick.
#[tantek]wonders if [KevinMarks] can recall anything about the QTVR format for posting panoramic images, you know, from the 1990s
#LoqiIt looks like we don't have a page for "micropubkit" yet. Would you like to create it? (Or just say "micropubkit is ____", a sentence describing the term)
#[KevinMarks]There were at least a couple of variations - panoramic/spherical and cubic iirc
#Loqi[preview] [pixelfed] We are working on OIDC support, and exploring IndieAuth!The Sign-in with Mastodon feature uses Mastodon specific APIs and is a temporary measure until we get OIDC in place and other platforms support it!#pixelfed #oidc #indieauth
#[schmarty]aaronpk: it's my attempt to package up PHP controllers and middleware common to micropub (and indieauth) clients. i tend to hack on it locally and it's not packaged at all so it's a secret to everyone. https://git.schmarty.net/schmarty/MicropubKit
#LoqiIt looks like we don't have a page for "silorider" yet. Would you like to create it? (Or just say "silorider is ____", a sentence describing the term)