mirror of
https://github.com/versia-pub/activitypub.git
synced 2025-12-06 06:38:20 +01:00
feat: sync follow to lysand
This commit is contained in:
parent
86c6df24a7
commit
42abaa0779
|
|
@ -11,14 +11,10 @@ use serde::{Deserialize, Serialize};
|
|||
use url::Url;
|
||||
|
||||
use crate::{
|
||||
database::StateHandle,
|
||||
entities::{
|
||||
database::StateHandle, entities::{
|
||||
follow_relation::{self, Entity},
|
||||
post, prelude, user,
|
||||
},
|
||||
error,
|
||||
utils::{generate_follow_accept_id, generate_random_object_id},
|
||||
DB,
|
||||
}, error, lysand::funcs::send_follow_accept_to_lysand, utils::{generate_follow_accept_id, generate_random_object_id}, DB
|
||||
};
|
||||
|
||||
#[derive(Deserialize, Serialize, Debug)]
|
||||
|
|
@ -196,5 +192,7 @@ async fn save_accept_follow(
|
|||
let res = prelude::FollowRelation::update(active_query);
|
||||
let model = res.exec(db).await?;
|
||||
|
||||
let _ = send_follow_accept_to_lysand(model.clone()).await?;
|
||||
|
||||
Ok(model)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ use super::{
|
|||
superx::request_client,
|
||||
};
|
||||
|
||||
async fn send_follow_accept_to_lysand(model: follow_relation::Model) -> anyhow::Result<()> {
|
||||
pub async fn send_follow_accept_to_lysand(model: follow_relation::Model) -> anyhow::Result<()> {
|
||||
let request_client = request_client();
|
||||
let db = DB.get().unwrap();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue