diff options
Diffstat (limited to 'server/src/db/post_view.rs')
-rw-r--r-- | server/src/db/post_view.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/server/src/db/post_view.rs b/server/src/db/post_view.rs index 3c155b00..a7ac58c0 100644 --- a/server/src/db/post_view.rs +++ b/server/src/db/post_view.rs @@ -22,10 +22,16 @@ table! { embed_description -> Nullable<Text>, embed_html -> Nullable<Text>, thumbnail_url -> Nullable<Text>, + ap_id -> Text, + local -> Bool, banned -> Bool, banned_from_community -> Bool, + creator_actor_id -> Text, + creator_local -> Bool, creator_name -> Varchar, creator_avatar -> Nullable<Text>, + community_actor_id -> Text, + community_local -> Bool, community_name -> Varchar, community_removed -> Bool, community_deleted -> Bool, @@ -63,10 +69,16 @@ table! { embed_description -> Nullable<Text>, embed_html -> Nullable<Text>, thumbnail_url -> Nullable<Text>, + ap_id -> Text, + local -> Bool, banned -> Bool, banned_from_community -> Bool, + creator_actor_id -> Text, + creator_local -> Bool, creator_name -> Varchar, creator_avatar -> Nullable<Text>, + community_actor_id -> Text, + community_local -> Bool, community_name -> Varchar, community_removed -> Bool, community_deleted -> Bool, @@ -107,10 +119,16 @@ pub struct PostView { pub embed_description: Option<String>, pub embed_html: Option<String>, pub thumbnail_url: Option<String>, + pub ap_id: String, + pub local: bool, pub banned: bool, pub banned_from_community: bool, + pub creator_actor_id: String, + pub creator_local: bool, pub creator_name: String, pub creator_avatar: Option<String>, + pub community_actor_id: String, + pub community_local: bool, pub community_name: String, pub community_removed: bool, pub community_deleted: bool, @@ -487,6 +505,12 @@ mod tests { embed_description: None, embed_html: None, thumbnail_url: None, + ap_id: "changeme".to_string(), + local: true, + creator_actor_id: inserted_user.actor_id.to_owned(), + creator_local: true, + community_actor_id: inserted_community.actor_id.to_owned(), + community_local: true, }; let expected_post_listing_with_user = PostView { @@ -526,6 +550,12 @@ mod tests { embed_description: None, embed_html: None, thumbnail_url: None, + ap_id: "changeme".to_string(), + local: true, + creator_actor_id: inserted_user.actor_id.to_owned(), + creator_local: true, + community_actor_id: inserted_community.actor_id.to_owned(), + community_local: true, }; let read_post_listings_with_user = PostQueryBuilder::create(&conn) |