WIP: Activitystreams crate #27

Merged
elegaanz merged 4 commits from activitystreams into master 2018-05-18 22:14:56 +00:00
elegaanz commented 2018-05-18 08:08:03 +00:00 (Migrated from github.com)

Still a lot of // TODO to resolve

Closes #17

Still a lot of `// TODO` to resolve Closes #17
asonix commented 2018-05-18 16:31:19 +00:00 (Migrated from github.com)

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?

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?
elegaanz commented 2018-05-18 16:49:58 +00:00 (Migrated from github.com)

@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.

@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.
elegaanz commented 2018-05-18 18:23:23 +00:00 (Migrated from github.com)

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).

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).
asonix commented 2018-05-18 19:06:43 +00:00 (Migrated from github.com)

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.

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.
elegaanz commented 2018-05-18 19:14:01 +00:00 (Migrated from github.com)

Nice! Thanks for your help.

Nice! Thanks for your help.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Plume/Plume#27
No description provided.