mirror of
https://github.com/versia-pub/activitypub.git
synced 2025-12-06 06:38:20 +01:00
Add follower and following count fields to user and person models
This commit is contained in:
parent
b5c9c2b9e6
commit
8a4f5b795c
|
|
@ -79,6 +79,8 @@ async fn main() -> actix_web::Result<(), anyhow::Error> {
|
|||
public_key: Set(keypair.public_key.clone()),
|
||||
private_key: Set(Some(keypair.private_key.clone())),
|
||||
last_refreshed_at: Set(chrono::offset::Utc::now()),
|
||||
follower_count: Set(0),
|
||||
following_count: Set(0),
|
||||
url: Set(ap_id.to_string()),
|
||||
local: Set(true),
|
||||
..Default::default()
|
||||
|
|
|
|||
|
|
@ -129,6 +129,8 @@ impl Object for user::Model {
|
|||
local: Set(false),
|
||||
summary: Set(json.summary),
|
||||
url: Set(json.url.to_string()),
|
||||
follower_count: Set(0),
|
||||
following_count: Set(0),
|
||||
..Default::default()
|
||||
};
|
||||
let model = model.insert(_data.database_connection.as_ref()).await;
|
||||
|
|
|
|||
Loading…
Reference in a new issue