mirror of
https://github.com/versia-pub/activitypub.git
synced 2026-03-13 10:59:17 +01:00
[feat]: lysand to ap for posts and users
This commit is contained in:
parent
bcab516a1f
commit
1174f92915
11 changed files with 151 additions and 39 deletions
|
|
@ -6,7 +6,7 @@ use crate::{
|
|||
person::DbUser,
|
||||
post::{DbPost, Note},
|
||||
},
|
||||
utils::generate_object_id,
|
||||
utils::generate_random_object_id,
|
||||
};
|
||||
use activitypub_federation::{
|
||||
activity_sending::SendActivityTask,
|
||||
|
|
@ -39,7 +39,7 @@ impl CreatePost {
|
|||
to: note.to.clone(),
|
||||
object: note,
|
||||
kind: CreateType::Create,
|
||||
id: generate_object_id(data.domain())?,
|
||||
id: generate_random_object_id(data.domain())?,
|
||||
};
|
||||
let create_with_context = WithContext::new_default(create);
|
||||
let sends = SendActivityTask::prepare(
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ use crate::{
|
|||
database::StateHandle,
|
||||
entities::{follow_relation, post, user},
|
||||
error,
|
||||
utils::{generate_follow_accept_id, generate_object_id},
|
||||
utils::{generate_follow_accept_id, generate_random_object_id},
|
||||
DB,
|
||||
};
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ impl Follow {
|
|||
actor: local_user.clone(),
|
||||
object: followee.clone(),
|
||||
kind: FollowType::Follow,
|
||||
id: generate_object_id(data.domain())?,
|
||||
id: generate_random_object_id(data.domain())?,
|
||||
};
|
||||
let create_with_context = WithContext::new_default(create);
|
||||
let sends = SendActivityTask::prepare(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue