mirror of
https://github.com/versia-pub/activitypub.git
synced 2025-12-06 06:38:20 +01:00
fix collectuins
This commit is contained in:
parent
1a9eca3e90
commit
592f0cecbd
|
|
@ -220,6 +220,8 @@ pub async fn versia_user_from_db(
|
||||||
followers: followers_url,
|
followers: followers_url,
|
||||||
following: following_url,
|
following: following_url,
|
||||||
featured: featured_url,
|
featured: featured_url,
|
||||||
|
likes: Some(likes_url),
|
||||||
|
dislikes: Some(dislikes_url),
|
||||||
};
|
};
|
||||||
let user = super::objects::User {
|
let user = super::objects::User {
|
||||||
rtype: "User".to_string(),
|
rtype: "User".to_string(),
|
||||||
|
|
@ -228,8 +230,6 @@ pub async fn versia_user_from_db(
|
||||||
username: user.username,
|
username: user.username,
|
||||||
display_name,
|
display_name,
|
||||||
inbox: inbox_url,
|
inbox: inbox_url,
|
||||||
likes: Some(likes_url),
|
|
||||||
dislikes: Some(dislikes_url),
|
|
||||||
bio: Some(bio),
|
bio: Some(bio),
|
||||||
collections,
|
collections,
|
||||||
avatar,
|
avatar,
|
||||||
|
|
|
||||||
|
|
@ -242,10 +242,6 @@ pub struct User {
|
||||||
pub display_name: Option<String>,
|
pub display_name: Option<String>,
|
||||||
pub collections: UserCollections,
|
pub collections: UserCollections,
|
||||||
pub inbox: Url,
|
pub inbox: Url,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
pub likes: Option<Url>,
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
pub dislikes: Option<Url>,
|
|
||||||
pub username: String,
|
pub username: String,
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub bio: Option<ContentFormat>,
|
pub bio: Option<ContentFormat>,
|
||||||
|
|
@ -267,6 +263,16 @@ pub struct UserCollections {
|
||||||
pub featured: Url,
|
pub featured: Url,
|
||||||
pub followers: Url,
|
pub followers: Url,
|
||||||
pub following: Url,
|
pub following: Url,
|
||||||
|
#[serde(
|
||||||
|
skip_serializing_if = "Option::is_none",
|
||||||
|
rename="pub.versia:likes/Likes"
|
||||||
|
)]
|
||||||
|
pub likes: Option<Url>,
|
||||||
|
#[serde(
|
||||||
|
skip_serializing_if = "Option::is_none",
|
||||||
|
rename="pub.versia:likes/Dislikes"
|
||||||
|
)]
|
||||||
|
pub dislikes: Option<Url>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue