WIP: Activitystreams crate #27
No reviewers
Labels
No labels
A: API
A: Backend
A: Federation
A: Front-End
A: I18N
A: Meta
A: Security
Build
C: Bug
C: Discussion
C: Enhancement
C: Feature
Compatibility
Dependency
Design
Documentation
Good first issue
Help welcome
Mobile
Rendering
S: Blocked
S: Duplicate
S: Incomplete
S: Instance specific
S: Invalid
S: Needs Voting/Discussion
S: Ready for review
Suggestion
S: Voted on Loomio
S: Wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Plume/Plume#27
Loading…
Reference in a new issue
No description provided.
Delete branch "activitystreams"
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?
Still a lot of
// TODO
to resolveCloses #17
Do you feel like using this crate is better than what you were doing before?
Is there anything that it doesn't do that you wish it did?
@asonix I think my code is more idiomatic now, and the way we are serializing/deserializing activities is really cleaner. One thing I would have liked to completely avoid, is to manipulate the JSON object directly (as I'm doing here, for instance, https://github.com/Plume-org/Plume/pull/27/files#diff-a244a0dbf50367a4f27f1f20df813475R48 because I didn't found any clean solution). But it globally nice to use, even if it is hard to have a nice API for ActivityStreams in Rust.
Actually an issue I'm encountering is that the ActivityPub spec adds some properties to actors, on top of those defined by ActivityStreams (
inbox
for instance). I don't know if there is a solution in your crate that I didn't find, but if not it would be nice to allow to add custom properties to actors (and why not any kind of object actually).Yeah, custom properties is something that I've had trouble with figuring out. My method of doing it now is through the CustomLink and CustomObject types
You can do
CustomObject::new(your_base_object, your_extra_properties) and it will implement Object if your_base_object implements Object, actor if your_base_object implements Actor, etc.
Nice! Thanks for your help.