Update crates/apub/src/fetcher/site_or_community_or_user.rs

Thanks, I like that better.

Co-authored-by: dullbananas <dull.bananas0@gmail.com>
This commit is contained in:
Dessalines 2024-07-27 16:09:39 -04:00 committed by GitHub
parent 08a0a6d3ce
commit 51d5439f59
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -88,14 +88,13 @@ impl Object for SiteOrCommunityOrUser {
SiteOrPersonOrGroup::Instance(a) => {
SiteOrCommunityOrUser::Site(ApubSite::from_json(a, data).await?)
}
SiteOrPersonOrGroup::PersonOrGroup(a) => match a {
PersonOrGroup::Person(p) => SiteOrCommunityOrUser::UserOrCommunity(UserOrCommunity::User(
SiteOrPersonOrGroup::PersonOrGroup(a) => SiteOrCommunityOrUser::UserOrCommunity(match a {
PersonOrGroup::Person(p) => UserOrCommunity::User(
ApubPerson::from_json(p, data).await?,
)),
PersonOrGroup::Group(g) => SiteOrCommunityOrUser::UserOrCommunity(
UserOrCommunity::Community(ApubCommunity::from_json(g, data).await?),
),
},
PersonOrGroup::Group(g) =>
UserOrCommunity::Community(ApubCommunity::from_json(g, data).await?),
}),
})
}
}