[KevinMarks]Another trick is to upload to YouTube so they encode it then download it again, as they have had a team of experts tuning the encoding quality/bit rate for a while now.
nsh, nertzy, [KevinMarks], [schmarty], barnaby and capjamesg joined the channel
capjamesgHello IndieWeb! Could someone please send a webmention to https://jamesg.blog/printer/? I'm going to be testing my webmention printer tomorrow and will need a recent webmention (and I'd like my first message to be from a community member!).
aaronpkyeah IETF RFCs can't change, but you can still think of OAuth as a "living standard" in that things get added and removed to it over time by publishing new RFCs
aaronpkif you want to know about the state of things within a particular working group you have to get more involved and follow the group's mailing list and such
barnabyalso neither spec response example lists the Cache-control header in the auth code issuing redirect response, but I guess it’d be suitable there too
aaronpkthe reason being the only way to get a valid auth code is if you are the legitimate client or if you stole one. the legitimate client should have no reason to make a request with a valid auth code that is invalid for some reason. an attacker might be able to do more things with the stolen auth code if it remains valid
barnabyI’ve been using valid_until: epoch seconds, but if expires_in is official then I’ll change up my default implementation and interface documentation to use that
[jacky]Frankly the mentions can be parsed in whichever format you define (it'd send the URL to something like granary or x-ray or your own tool for parsing a page) so it doesn't need to be in Microformats land
barnabymicroformats2 is designed to be generic, using the classname prefixes to determine how to parse elements, but not needing hard-coded lists of property names
[jacky]Tbh I would have done the same re: class names to base the tests and then refactor to see if it still works with the expected classes (and then throw a wrench 🔧)
barnabyone of the reasons for this was that a lot of the classic microformats parsers were necessarily based on hard-coded classnames, and they were a lot of work to maintain and went out of date quickly
barnabyso I’d recommend thinking about how you could implement generic parsing. I get that it’s more difficult in rust, especially if you want to end up with nice rust-like data structures rather than a big hash map
barnaby[jacky]: did you have any ideas about how to handle generic mf parsing in rust? my intuition would be to have the parser build a big hash map, and then have consuming code which turns it into a strongly typed application-specific struct structure
[jacky]Barnaby: I was thinking of leaning on serde to handle deserialization. We have some "base" properties for objects that can be made recursive and as long as it's defined with some expected things (like "type") it should work!
barnabybut if your goal is to make something which is useful for other people, having a generic parser, producing generic data which application-specific code then consumes is the way to go
aaronpknormally it's the case that if there is as2 it's more reliable than the html, mainly because of wordpress' legacy mf1 classes that continue to cause problems
LaBcasse[m]<aaronpk "normally it's the case that if t"> Ok, it explains my error, but there should be a failback using HTML if AS2 do not contains the syndication, no ?
barnabyit seems like webmention handling is complex enough to justify structuring things such that having multiple code paths and fallbacks is possible
aaronpkthis is also somewhat unique to indienews which is expecting the link in the syndication property rather than anywhere in the entry like normal webmention receiving
barnabyI suppose a generic solution would be to optionally pass xray a list of properties which the consuming code is interested in, and if it knows that some of them are not supported by AS2, then it negotiates for HTML
LoqiXRay is an open source API that returns structured data for a URL by parsing microformats and following other indieweb algorithms, and is part of the p3k suite of applications https://indieweb.org/XRay
LaBcasse[m]True, it is difficult to reuse these data. I wonder what kind of data is useful to gather for reusing the webmention, so the webmention receiver I created gathers a lot of thing.
barnabyas the first thing to do on any request is to fetch the client_id and validate the redirect_uri, so that other errors can be reported to the client app via a redirect
barnabyhmm I suppose I can limit the number of requests by skipping fetching the client_id if the redirect_uri itself sufficiently matches the client_id
barnabybut probably the better way to do this is just to allow the library consumer to add a caching adaptor to the HTTP request callback if they want to avoid excess requests
mgdm[jacky]: I'm opting into a little bit of self-inflicted complexity by trying to deploy this on NixOS, heh, so it might be a wee while before I get it to boot :-)
[jacky]Haha tbh I'm even down to take patches to help it work under Nix! I did optimize it a bit for a Docker/Dokku/Heroku-esque setup but I'm eager to see how else it can be deployed
aaronpkso wechat is odd, your personal QR code is actually a URL, but visiting that URL doesn't do anything useful, it just redirects to teh app website
barnabyahhh I love automated testing. it only took a few minutes to refactor my IA library to validate parameters in the right order and always return errors the correct way, while maintaining the same test coverage
barnabyto anyone interested in PHP IndieAuth/Micropub server development, I’d be very grateful for feedback about this README and the specific API docs linked from it: https://github.com/Taproot/indieauth
barnabythe docs are by no means complete, but I’d be curious for first-impressions of how clear the usage examples and API docs are, and any issues you’d anticipate using the library with your web framework of choice
aaronpkok my rel=me link for wechat links to the wechat URL, which as far as I can tell is useless, but I wrote some JS to pop up the QR code if you click it