Home | Notifications | New Note | Local | Federated | Search | Logout

Note Detail


silverpill@silverpill@mitra.social (2026-06-14 20:52:07)
I've been reviewing the new FEP from the Mastodon team today, and one thing that caught my attention is the use of Accept and Reject activities for managing approvals. Another day, someone proposed to use Follow activity for "watching a thread".

So now, when you receive a standard activity, you need to use increasingly complicated heuristics to figure out what the activity does, because it is not possible to infer that from its type anymore.

This has to stop. I think we need to start giving our activities better names.

#ActivityPub
---Reply--- julian@julian@activitypub.space (2026-06-14 20:59:38) I see this from the other direction — I think it's great that we have a unified vocabulary for approvals and rejections. Why would we need a separate FeaturedItemAccept when Accept will do nicely?


From a code organization perspective it's as complicated as you make it. For the more overloaded activities, a switch..case separates out discrete logic into physically different blocks. You could break that out to separate functions for organization.


Once an activity handles more than one or two variants you begin to learn to make fewer assumptions based on type :smirk:
Reply

---Replies---
silverpill@silverpill@mitra.social (2026-06-14 21:07:45)
Do you also use the same 10 names for all variables in your code?