#dev 2023-03-25

2023-03-25 UTC
lagash joined the channel
#
prologic
Q: What does a correct unfollow activity look like?
#
prologic
It's an Undo+Follow right? But having trouble with this :/
#
[snarfed]
prologic right!
#
prologic
I think this is gonng be more complicated than I thought :)
#
prologic
I think I'm working it out
#
[snarfed]
Ok! Let me know if you have any q's
#
[snarfed]
The id of the original follow is nice to include but may not be strictly be6cause
#
prologic
unfortunately I don't track that, so hoping I don't need it or have to
#
prologic
I literally use random uuids for ids basically everywhere (almost) becuase I just don't car eabout ids
#
[snarfed]
Try without then and see if it works
#
prologic
[snarfed] ++
#
Loqi
[snarfed] has 83 karma in this channel over the last year (127 in all channels)
geoffo joined the channel
#
[tantek]
I really dislike the overloading of Undo for that
#
[tantek]
"Undo+Follow" is not the same as unfollow
#
[tantek]
and frankly, in a push-based system, it's not about "following" at all
#
[tantek]
it really means "stop sending me stuff"
#
[tantek]
e.g. in email the closest analog would be unsubscribe, or cancel subscription
geoffo joined the channel
#
[snarfed]
That's the effect
#
[snarfed]
Oh you'd like follow/friend separate from subscribe?
#
[snarfed]
True then. I actually like that Facebook allows that
[chrisbergr] joined the channel
#
[chrisbergr]
Does that implies, in reverse, that follow is not an IndieWeb concept or that there is no IndieWeb way to follow others?
#
[chrisbergr]
Or rather, it means that for silos follow is just another name for subscibing.
aaronpk joined the channel
#
[tantek]
[snarfed] yes, I think there is quite a bit of precedent for separating those semantics for user-centric use-cases
#
[tantek]
what is follow
#
Loqi
👣 follow is a common feature (and often UI button) in silo UIs (like Twitter) that adds updates from that profile (typically a person) to the stream shown in an integrated reader, and sometimes creates a follow post either in the follower's stream ("… followed …" or "… is following …") thus visible to their followers, and/or in the notifications of the user being followed ("… followed you") https://indieweb.org/follow
#
[tantek]
[chrisbergr] ^ more there re: "follow is not an IndieWeb concept or that there is no IndieWeb way to follow others"
gRegor and gRegorLove_ joined the channel
#
[chrisbergr]
[tantek] thx. If I get it right, to follow others means different things depending on the intention of the follower. And in your case, when you post that you follow potus, you're doing this with "following as recommendation" intended?
#
[tantek]
That's a good observation and insight "means different things depending on the intention of the follower"
#
[tantek]
yes that follow post of mine had a lot of subtext, including following as recommendation.
lagash joined the channel
#
prologic
[snarfed] Do you see anything obviously wrong in this activity?
#
prologic
{\"@context\":[\"https://www.w3.org/ns/activitystreams\",\"https://w3id.org/security/v1\"],\"id\":\"https://yarn.mills.io/#01GWBBANNRKVAH5R7YRK84SYSE\",\"type\":\"Undo\",\"actor\":\"https://yarn.mills.io/user/james/\",\"object\":{\"@context\":[\"https://www.w3.org/ns/activitystreams\",\"https://w3id.org/security/v1\"],\"id\":\"https://yarn.mills.io/#01GWBBANNRKVAH5R7YRK84SYSE\",\"type\":\"Follow\",\"actor\":\"https://yarn.mi
#
prologic
lls.i
#
prologic
o/user/james/\",\"object\":\"https://gts.mills.io/users/prologic\",\"to\":\"https://gts.mills.io/users/prologic\"},\"to\":\"https://gts.mills.io/users/prologic\"}
#
prologic
Oh bloody hell that doesn't quite work on IRC as a single line :D
#
prologic
There
lagash- joined the channel
#
[snarfed]
prologic I think that looks ok. GTS may require the original follow's id
#
prologic
hmm
#
prologic
:/
#
[tantek]
it's an interesting contrast in "push" models, ActivityPub vs Websub
#
prologic
if this requires the original follow's id, I'm screwed :/
#
prologic
I never stored it in the first place :(
#
[tantek]
WebSub, the subscribers MUST keep renewing their subscription, the default is to drop subscriptions after some timeout, whereas with AP, the subscribers MUST explicitly request cancellation of a subscription, otherwise they are spammed forever
#
prologic
Do other AP servers behave this way?
#
[tantek]
I'm not sure which is a "better" model (for UX, scalability vs reliability)
#
prologic
[tantek] I actually hate this about AP :(
#
[tantek]
I can understand that!
#
prologic
I get so much spam now its not even funny, and my instance doens't follow any of the actors spamming me :(
#
[tantek]
would be interesting to hear opinions of developers who have implemented both ActivityPub and WebSub
#
[tantek]
wow that's nuts
#
prologic
I have!
#
prologic
And I can tell you, websub is way better and easier to work with
Hey joined the channel
#
[snarfed]
why? can't you store it?
#
[snarfed]
oops sorry, delayed
#
prologic
I've never had any need to store incoming activities in their original form
#
prologic
if you recall I'm bridging between Twtxt and Activity Pub
#
prologic
So if this is somehow a weird requirement to "Unfollow an actor" then I'm going to have to rethink the design a bit
#
prologic
:(
#
[snarfed]
you do as soon as you want your users to follow AP actors and then read their posts
#
[snarfed]
you could try refollowing with a new id, store that id, and then Undo it
#
prologic
Hmm
#
prologic
But you can see a problem here right? In that I currently have actors sending me spam that no-one follows
#
prologic
This is awful, because it would appear there is no way to undo or block this besides dropping them on the floor
#
prologic
So you're forever forced to deal with inbound requests against your inbox(s)
#
prologic
we've talked about this before
#
prologic
So in the case of other actors sending me stuff I never asked for, there is no way to unfollow them or tell them to stop
#
prologic
right?
#
prologic
sqlite> select * from follows;
#
prologic
[{"id":"01GT3M27C30S3ZDZXT709WHWMP","created_at":"2023-02-25 06:27:16","updated_at":"2023-02-25 06:27:16","uri":"https://yarn.mills.io/#01GT3M26XKY57YSD50YE7M5S4Q","account_id":"01GT3M273P8R603VQGWX0KYNPE","target_account_id":"01DBA70S0E6CEZ78EJJKCQF69H","show_reblogs":1,"notify":0}]
#
[snarfed]
yeah this is basically the conversation we had before
#
prologic
This is from the GTS sqlite db's follows table
#
prologic
Yeah sadly I never implemented UnFollow so I'm trying to do that and clean stuff up
#
prologic
But this is going to be basically impossible now :(
#
prologic
I'm actually not sure what to do (beyond dropping to the floor) al these other actors that no-one ever followed
#
[snarfed]
right, like we discussed before, drop them, it's cheap
#
prologic
gonna see if I reuse this supposed Follow ID (hard code it just to see) whether that does the trick
#
prologic
Yup that's the plan
#
prologic
I'm just going back over this, left it for a few weeks :) And I'm just pointing out how vastly different the whole Activity Pub ecosystem really is, and really how it has flaws that are quite surprising really for me, most notably the behaviour of actors "pushing" you stuff you never asked for
#
prologic
On this specific point, does this just lead to spam and what I see some smaller Mastodon instances just choose to de-federate because of this?
#
[snarfed]
remind me of an example of this? other than Deletes?
#
prologic
Oooh basically have a look at https://twtxt.net/ :)
#
prologic
I followed one person (actor) and now I get all sorts of other actor's notes too
#
prologic
I can prove no-one follows them by looking at my user db and seeing if anyone does
#
[snarfed]
ok. I don't know then
#
prologic
So the good news is that you were right about the Follow ID thing
#
prologic
Now I'm wondering whether a) I track IDs at all or b) Come up with a content addressable hash for IDs for things like this
#
prologic
LIke Hash(from+to)
#
prologic
As the Follow ID
#
[tantek]
ok that's a superbad design (needing to remeber a follow-id)
#
[tantek]
superbad protocol design
#
[tantek]
it should be stateless
#
[tantek]
what is ActivityPub spam
#
Loqi
It looks like we don't have a page for "ActivityPub spam" yet. Would you like to create it? (Or just say "ActivityPub spam is ____", a sentence describing the term)
#
[tantek]
ActivityPub spam is when your [[ActivityPub]] inbox is sent messages from other ActivityPub servers from accounts that your server never sent a follow activity for.
#
prologic
[tantek] ++
#
Loqi
[tantek] has 25 karma in this channel over the last year (83 in all channels)
#
prologic
Yeah I agree this is a really awful part of the AP protocol for me
#
prologic
It really makes me not want to do this bridging work at all, but users of Yarn.social do kind of want it (https://twtxt.net/twt/zfjlbcq)
#
Loqi
[preview] [prologic] PLEASE DO NOT REPLY: So far for Yarn / Twtxt <-> Activity Pub support (if I”m not mistaken) we have: ✅ @marado@twtxt.net @stigatle@yarn.stigatle.no @ocdtrekkie@twtxt.net @david@collantes.social ❌ @mckinley@twtxt.net @darch@neotxt.dk @carsten@y...
#
[snarfed]
I don't know that AP requires you to remember the original follow id. may be a GTS thing
#
prologic
Yeah I'm not really sure to be honest
#
prologic
Does the spec/protocol even hint at what servers SHOULD do or MUST do?
#
prologic
This may be a case of bad implementations :(
#
prologic
In the case of GTS and the Go libraries that exist, they assume you are using a SQL database to build your AP server :(
#
prologic
such a poor assumption to make, because it binds you into this sort of crap
#
prologic
I can't see where it defines this sort of behaviour I'm seeing in GTS
#
prologic
I agree with you
#
prologic
In which case GTS's implementation is wrong here
#
[snarfed]
so you originally tried with no id in the inner Follow object? or with a wrong id?
#
prologic
with a wrong id
#
prologic
I'm now testing to see what happens if we Refollow and Unfollow
#
[snarfed]
try with no id?
#
prologic
and see how that behaves
IWSlackGateway joined the channel
#
prologic
good news
#
prologic
GTS updates the uri if you Unfollow/Refollow
#
prologic
And using a content-addressable hash for the ID for Follow/UnFollow works nicely
[snarfed] joined the channel
lagash, [tantek], ReleeSquirrel and IWSlackGateway joined the channel
#
prologic
Is there more to threading than just setting the inReplyTo field of a note?
[jeremycherfas], lagash and gRegor joined the channel
#
prologic
Hmm I thought I knew how to traverse an actor's outbox for their published/public notes
#
prologic
But I don't :/
#
prologic
It seems you just get all the create activites, but no embedded note objects?
#
prologic
Do I really have to do a network request for each status linked?
lagash and [KevinMarks] joined the channel
#
[KevinMarks]
Arguably webmention opens you up to that kind of "spam" too - the point of it is to told about actions by people that you don't follow. Are the AP ones likes, reposts and replies to posts that you have sent, or are they other admin stuff?
lagash joined the channel
#
prologic
Replies -- I don't support anything else
#
Loqi
Replies has -1 karma over the last year
#
prologic
Lol
#
IWDiscordRelay
<c​apjamesg#4492> 🙃
lagash, IWDiscordRelay, mouse[d] and [timothy_chambe] joined the channel
#
IWDiscordRelay
<b​enpate#1129> prologic: I’m pretty sure GoToSocial uses the go-fed library which is (excruciatingly) neutral on the storage back end. You need to write your own storage for everything, which makes sense because your app is responsible for all the business logic.
#
prologic
I'm not using go-fed
#
IWDiscordRelay
<b​enpate#1129> Good. It’s a bear to use. What are you using, then?
#
prologic
I've basically written my own ap library thats infiniately simpler
#
prologic
but not ready for public consumption :)
#
prologic
its very rough around the edges and AP is hard :(
#
IWDiscordRelay
<b​enpate#1129> I did the same. Also rough for now, but at least my own code is straightforward, yeah? Have you posted your library publicly? I’d love to take a look!
#
IWDiscordRelay
<b​enpate#1129> [KevinMarks]: In theory, a good block list could prevent WebMention spam just like it would other kids of unwanted messages.
#
prologic
well it is publicly visible if you want to poke around https://git.mills.io/yarnsocial/yarn
#
IWDiscordRelay
<b​enpate#1129> Cool, thank you! I’m still stuck in the “custom code to federate with everyone’s separate flavors of ActivityPub” stage. So, another baseline of example code will be really helpful!
#
IWDiscordRelay
<b​enpate#1129> My work is not nearly as far along: https://github.com/EmissarySocial/emissary with ActivotyPub support pulled into a separate module: https://github.com/benpate/hannibal
#
prologic
your welcome!
#
Loqi
[preview] [EmissarySocial] emissary: A Trustworthy Space on the Web (ActivityPub + IndieWeb)
[snarfed] joined the channel
#
[snarfed]
benpate you mentioned Bluesky too, let us know if/when you get to it, some of us have been poking at it too
#
[snarfed]
Eg [aaronpk] syndicates to it, I have https://github.com/snarfed/lexrpc and support in https://granary.io/ , etc. Eventually plan is to add it to https://fed.brid.gy/
lagash joined the channel
#
IWDiscordRelay
<b​enpate#1129> [snarfed]: Yeah. The protocol is is a lot of flux right now, so my plan is to wait and see. It has the big backing, so it seems like a safe bet that BlueSky is going somewhere. Hopefully the Go libraries that they publish will be usable enough without the same kind of custom work we’ve all had to do with ActovityPib.
#
IWDiscordRelay
<b​enpate#1129> [edit] [snarfed]: Yeah. The protocol is is a lot of flux right now, so my plan is to wait and see. It has the big backing, so it seems like a safe bet that BlueSky is going somewhere. Hopefully the Go libraries that they publish will be usable enough without the same kind of custom work we’ve all had to do with ActivityPib.
#
prologic
I just would love if it library authors just didn't make so. many assumptions about how users would use their library
#
prologic
:(
#
[snarfed]
benpate do you know whether you're hoping to syndicate or federate to Bluesky?
#
prologic
*phew* fixed several bugs and managed to figure out how to rewrite microformat mentions and convert the incoming HTML from actors into more sensible Markdown which also fixed another bug
#
IWDiscordRelay
<b​enpate#1129> [snarfed]: I’m assuming I’ll federate with it, but honestly it’ll take a lot of work to figure out when the time comes. Ideally, you could just host another node on the BlueSky network, install a DID, and go.
mro joined the channel
#
[snarfed]
prologic yeah I didn't a surprising amount of time on converting HTML to text reasonably, preserving formatting, handling whitespace, etc
#
prologic
yeah I'm having to do the same too
#
[snarfed]
er, s/didn't/spent/
#
prologic
using the microformats libraries that do exist (and I use at least one of them) is actually a pain
#
prologic
I need to maybe one day rewrite a decent mf2 library
lagash joined the channel
#
Loqi
9th anniversary of the launch of Bridgy Publish https://snarfed.org/2014-03-25_bridgy-publish
#
Loqi
Countdown set by [tantek] on 2023-03-05 at 8:40pm PST
mro, jonnybarnes, geoffo, [TMichelleMoore] and [schmarty] joined the channel
lagash, [chrisbergr], mro, gRegor, bterry and [tw2113_Slack_] joined the channel
#
[tw2113_Slack_]
I forget who's in charge of https://indieweb.xyz/ but it's got cloudflare issues
geoffo, lagash and mro joined the channel
#
aaronpk
[manton] there are apparently 3 copies of my last photo on micro.blog with different permalinks, i got webmentions sent for each. did something change about how multiple feeds are imported? I do think I have several feeds being imported like my home page, my photos page, etc
#
aaronpk
ooh, two of them look like activitypub actually
lagash and geoffo joined the channel
#
prologic
My efforts last night managed to get threading working much better between Yarn.social dnd Activity Pub 👌 e.g: https://twtxt.net/conv/tqpkjaq
lagash and geoffo joined the channel