Accept all standard actor types #751
No reviewers
Labels
No labels
approved, awaiting change
bug
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs docs
needs tests
not a bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma#751
Loading…
Reference in a new issue
No description provided.
Delete branch "Oneric/akkoma:all-actor-types"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Sorry i missed this type, now the validator covers all standard ones listed in https://www.w3.org/TR/activitystreams-vocabulary/#actor-types and we now have real-world test samples for each one
Fixes https://meta.akkoma.dev/t/unable-to-follow-bots/705
@ -21,3 +21,3 @@
def validate(%{"type" => type, "id" => _id} = data, meta)
when type in ["Person", "Organization", "Group", "Application"] do
when type in ["Person", "Organization", "Group", "Application", "Service"] do
you can probably use Pleroma.Constants.actor_types here to avoid any issues like this popping up again
oh, id din’t knew we have this — but
Pleroma.Constants.actor_types()
is still a function callnot a real compile-time constant so it can’t be used in a guard expression. uhhh,ex_const
docs claim it already creates macros and those can be used in guards etc, but i get a compiler error when i tryIs there a way to access
Pleroma.Constatnts
stuff as actual constants?according to ex_const's docs, you can use them in guards
i'll have to check for myself if this works in reality though 🥴
ok, it actually does work when used correctly
i initially didn’t add
require Pleroma.Constants
and got a compiler error about “expected a compile-time constant” which confused me. Will push once tests finishi think it was added in the failed fetch processing PR we yoinked, so it's a new constant
25d267bc76
to83f75c3e93
thankies~