Migrate user/group to new activitystreams library #66
Loading…
Reference in New Issue
No description provided.
Delete Branch "migrate-apub-lib"
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?
I'm not a fan of the
take*
methods. It might be good for performance, but makes the code more complicated imo.Also I'm not sure how to use the methods in
ApActorExt
, likelet mut person = Person::new(); person.set_endpoints()
. I always get the following error, do I need a different kind of object for that?Second commit might have broken the federation test, its just stuck at
Waiting for Lemmy to start...
.Migrate user to new activitystreams libraryto Migrate user/group to new activitystreams library@ -378,0 +373,4 @@
pool: &DbPool,
) -> Result<Self, LemmyError> {
// TODO: this is probably gonna cause problems cause fetcher:292 also calls take_attributed_to()
let creator_and_moderator_uris = group.take_attributed_to().unwrap();
This here seems problematic, because
attributed_to
is taken in two places.You called it. The fix was easier than expected, just call a clone:
let creator_and_moderator_uris = group.clone().take_attributed_to().unwrap();
The tests are passing now.
Thanks! But I feel like this almost makes the
take_*
methods pointless, the performance that they give is probably all lost here.Btw I remembered that I forgot to remove the TODO here.
Hrm I'm getting this error when testing:
I'll investigate.
That one clone was the only one necessary, and the tests are passing. When you add that, I'll merge.