mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-12-23 18:40:34 +00:00
Rename: AsObject07 -> AsObject
This commit is contained in:
parent
33afe9111e
commit
0ab7774e29
7 changed files with 25 additions and 25 deletions
|
@ -201,7 +201,7 @@ where
|
|||
where
|
||||
A: AsActor<&'a C> + FromId<C, Error = E>,
|
||||
V: activitystreams::markers::Activity + serde::de::DeserializeOwned,
|
||||
M: AsObject07<A, V, &'a C, Error = E> + FromId<C, Error = E>,
|
||||
M: AsObject<A, V, &'a C, Error = E> + FromId<C, Error = E>,
|
||||
M::Output: Into<R>,
|
||||
{
|
||||
if let Self::NotHandled(ctx, mut act, e) = self {
|
||||
|
@ -519,7 +519,7 @@ pub trait AsActor<C> {
|
|||
/// }
|
||||
/// }
|
||||
/// ```
|
||||
pub trait AsObject07<A, V, C>
|
||||
pub trait AsObject<A, V, C>
|
||||
where
|
||||
V: activitystreams::markers::Activity,
|
||||
{
|
||||
|
@ -646,7 +646,7 @@ mod tests {
|
|||
&*MY_SIGNER
|
||||
}
|
||||
}
|
||||
impl AsObject07<MyActor, Create07, &()> for MyObject07 {
|
||||
impl AsObject<MyActor, Create07, &()> for MyObject07 {
|
||||
type Error = ();
|
||||
type Output = ();
|
||||
|
||||
|
@ -661,7 +661,7 @@ mod tests {
|
|||
}
|
||||
}
|
||||
|
||||
impl AsObject07<MyActor, Like07, &()> for MyObject07 {
|
||||
impl AsObject<MyActor, Like07, &()> for MyObject07 {
|
||||
type Error = ();
|
||||
type Output = ();
|
||||
|
||||
|
@ -676,7 +676,7 @@ mod tests {
|
|||
}
|
||||
}
|
||||
|
||||
impl AsObject07<MyActor, Delete07, &()> for MyObject07 {
|
||||
impl AsObject<MyActor, Delete07, &()> for MyObject07 {
|
||||
type Error = ();
|
||||
type Output = ();
|
||||
|
||||
|
@ -691,7 +691,7 @@ mod tests {
|
|||
}
|
||||
}
|
||||
|
||||
impl AsObject07<MyActor, Announce07, &()> for MyObject07 {
|
||||
impl AsObject<MyActor, Announce07, &()> for MyObject07 {
|
||||
type Error = ();
|
||||
type Output = ();
|
||||
|
||||
|
@ -798,7 +798,7 @@ mod tests {
|
|||
}
|
||||
}
|
||||
|
||||
impl AsObject07<FailingActor, Create07, &()> for MyObject07 {
|
||||
impl AsObject<FailingActor, Create07, &()> for MyObject07 {
|
||||
type Error = ();
|
||||
type Output = ();
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ use chrono::{self, NaiveDateTime, TimeZone, Utc};
|
|||
use diesel::{self, ExpressionMethods, QueryDsl, RunQueryDsl, SaveChangesDsl};
|
||||
use plume_common::{
|
||||
activity_pub::{
|
||||
inbox::{AsActor, AsObject07, FromId},
|
||||
inbox::{AsActor, AsObject, FromId},
|
||||
sign::Signer,
|
||||
Id, IntoId, ToAsString, ToAsUri, PUBLIC_VISIBILITY,
|
||||
},
|
||||
|
@ -431,7 +431,7 @@ impl FromId<DbConn> for Comment {
|
|||
}
|
||||
}
|
||||
|
||||
impl AsObject07<User, Create07, &DbConn> for Comment {
|
||||
impl AsObject<User, Create07, &DbConn> for Comment {
|
||||
type Error = Error;
|
||||
type Output = Self;
|
||||
|
||||
|
@ -441,7 +441,7 @@ impl AsObject07<User, Create07, &DbConn> for Comment {
|
|||
}
|
||||
}
|
||||
|
||||
impl AsObject07<User, Delete07, &DbConn> for Comment {
|
||||
impl AsObject<User, Delete07, &DbConn> for Comment {
|
||||
type Error = Error;
|
||||
type Output = ();
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ use activitystreams::{
|
|||
use diesel::{self, ExpressionMethods, QueryDsl, RunQueryDsl, SaveChangesDsl};
|
||||
use plume_common::activity_pub::{
|
||||
broadcast, broadcast07,
|
||||
inbox::{AsActor, AsObject07, FromId},
|
||||
inbox::{AsActor, AsObject, FromId},
|
||||
sign::Signer,
|
||||
Id, IntoId, PUBLIC_VISIBILITY,
|
||||
};
|
||||
|
@ -242,7 +242,7 @@ impl Follow {
|
|||
}
|
||||
}
|
||||
|
||||
impl AsObject07<User, FollowAct07, &DbConn> for User {
|
||||
impl AsObject<User, FollowAct07, &DbConn> for User {
|
||||
type Error = Error;
|
||||
type Output = Follow;
|
||||
|
||||
|
@ -296,7 +296,7 @@ impl FromId<DbConn> for Follow {
|
|||
}
|
||||
}
|
||||
|
||||
impl AsObject07<User, Undo07, &DbConn> for Follow {
|
||||
impl AsObject<User, Undo07, &DbConn> for Follow {
|
||||
type Error = Error;
|
||||
type Output = ();
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ use activitystreams::{
|
|||
use chrono::NaiveDateTime;
|
||||
use diesel::{self, ExpressionMethods, QueryDsl, RunQueryDsl};
|
||||
use plume_common::activity_pub::{
|
||||
inbox::{AsActor, AsObject07, FromId},
|
||||
inbox::{AsActor, AsObject, FromId},
|
||||
sign::Signer,
|
||||
Id, IntoId, PUBLIC_VISIBILITY,
|
||||
};
|
||||
|
@ -118,7 +118,7 @@ impl Like {
|
|||
}
|
||||
}
|
||||
|
||||
impl AsObject07<User, Like07, &DbConn> for Post {
|
||||
impl AsObject<User, Like07, &DbConn> for Post {
|
||||
type Error = Error;
|
||||
type Output = Like;
|
||||
|
||||
|
@ -187,7 +187,7 @@ impl FromId<DbConn> for Like {
|
|||
}
|
||||
}
|
||||
|
||||
impl AsObject07<User, Undo07, &DbConn> for Like {
|
||||
impl AsObject<User, Undo07, &DbConn> for Like {
|
||||
type Error = Error;
|
||||
type Output = ();
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ use diesel::{self, BelongingToDsl, ExpressionMethods, QueryDsl, RunQueryDsl};
|
|||
use once_cell::sync::Lazy;
|
||||
use plume_common::{
|
||||
activity_pub::{
|
||||
inbox::{AsActor, AsObject07, FromId},
|
||||
inbox::{AsActor, AsObject, FromId},
|
||||
sign::Signer,
|
||||
Hashtag, Hashtag07, HashtagType07, Id, IntoId, Licensed, Licensed07,
|
||||
LicensedArticle as LicensedArticle07, Source, SourceProperty, ToAsString, ToAsUri,
|
||||
|
@ -1054,7 +1054,7 @@ impl FromId<DbConn> for Post {
|
|||
}
|
||||
}
|
||||
|
||||
impl AsObject07<User, Create07, &DbConn> for Post {
|
||||
impl AsObject<User, Create07, &DbConn> for Post {
|
||||
type Error = Error;
|
||||
type Output = Self;
|
||||
|
||||
|
@ -1064,7 +1064,7 @@ impl AsObject07<User, Create07, &DbConn> for Post {
|
|||
}
|
||||
}
|
||||
|
||||
impl AsObject07<User, Delete07, &DbConn> for Post {
|
||||
impl AsObject<User, Delete07, &DbConn> for Post {
|
||||
type Error = Error;
|
||||
type Output = ();
|
||||
|
||||
|
@ -1149,7 +1149,7 @@ impl FromId<DbConn> for PostUpdate {
|
|||
}
|
||||
}
|
||||
|
||||
impl AsObject07<User, Update07, &DbConn> for PostUpdate {
|
||||
impl AsObject<User, Update07, &DbConn> for PostUpdate {
|
||||
type Error = Error;
|
||||
type Output = ();
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ use activitystreams::{
|
|||
use chrono::NaiveDateTime;
|
||||
use diesel::{self, ExpressionMethods, QueryDsl, RunQueryDsl};
|
||||
use plume_common::activity_pub::{
|
||||
inbox::{AsActor, AsObject07, FromId},
|
||||
inbox::{AsActor, AsObject, FromId},
|
||||
sign::Signer,
|
||||
Id, IntoId, PUBLIC_VISIBILITY,
|
||||
};
|
||||
|
@ -144,7 +144,7 @@ impl Reshare {
|
|||
}
|
||||
}
|
||||
|
||||
impl AsObject07<User, Announce07, &DbConn> for Post {
|
||||
impl AsObject<User, Announce07, &DbConn> for Post {
|
||||
type Error = Error;
|
||||
type Output = Reshare;
|
||||
|
||||
|
@ -214,7 +214,7 @@ impl FromId<DbConn> for Reshare {
|
|||
}
|
||||
}
|
||||
|
||||
impl AsObject07<User, Undo07, &DbConn> for Reshare {
|
||||
impl AsObject<User, Undo07, &DbConn> for Reshare {
|
||||
type Error = Error;
|
||||
type Output = ();
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ use openssl::{
|
|||
};
|
||||
use plume_common::{
|
||||
activity_pub::{
|
||||
inbox::{AsActor, AsObject07, FromId},
|
||||
inbox::{AsActor, AsObject, FromId},
|
||||
request::get,
|
||||
sign::{gen_keypair, Error as SignError, Result as SignResult, Signer},
|
||||
ActivityStream, ApSignature, ApSignature07, CustomPerson as CustomPerson07, Id, IntoId,
|
||||
|
@ -1248,7 +1248,7 @@ impl AsActor<&DbConn> for User {
|
|||
}
|
||||
}
|
||||
|
||||
impl AsObject07<User, Delete07, &DbConn> for User {
|
||||
impl AsObject<User, Delete07, &DbConn> for User {
|
||||
type Error = Error;
|
||||
type Output = ();
|
||||
|
||||
|
|
Loading…
Reference in a new issue