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

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

View file

@ -122,14 +122,14 @@ impl Object for SearchableObjects {
Ok(match self { Ok(match self {
SearchableObjects::Post(p) => SearchableKinds::Page(Box::new(p.into_json(data).await?)), SearchableObjects::Post(p) => SearchableKinds::Page(Box::new(p.into_json(data).await?)),
SearchableObjects::Comment(c) => SearchableKinds::Note(c.into_json(data).await?), SearchableObjects::Comment(c) => SearchableKinds::Note(c.into_json(data).await?),
SearchableObjects::PersonOrCommunity(pc) => match *pc { SearchableObjects::PersonOrCommunity(pc) => SearchableKinds::PersonOrGroup(Box::new(match *pc {
UserOrCommunity::User(p) => { UserOrCommunity::User(p) => {
SearchableKinds::PersonOrGroup(Box::new(PersonOrGroup::Person(p.into_json(data).await?))) PersonOrGroup::Person(p.into_json(data).await?)
} }
UserOrCommunity::Community(c) => { UserOrCommunity::Community(c) => {
SearchableKinds::PersonOrGroup(Box::new(PersonOrGroup::Group(c.into_json(data).await?))) PersonOrGroup::Group(c.into_json(data).await?)
} }
}, })),
}) })
} }