Replace some Inbox::with with with07

This commit is contained in:
Kitaiti Makoto 2022-04-24 06:54:07 +09:00
parent 46f4676efb
commit bd3e6a5a91

View File

@ -1,5 +1,5 @@
use activitypub::activity::*; use activitypub::activity::*;
use activitystreams::activity::Delete as Delete07; use activitystreams::activity::{Announce as Announce07, Delete as Delete07, Undo as Undo07};
use crate::{ use crate::{
comments::Comment, comments::Comment,
@ -49,7 +49,7 @@ impl_into_inbox_result! {
pub fn inbox(conn: &DbConn, act: serde_json::Value) -> Result<InboxResult, Error> { pub fn inbox(conn: &DbConn, act: serde_json::Value) -> Result<InboxResult, Error> {
Inbox::handle(conn, act) Inbox::handle(conn, act)
.with::<User, Announce, Post>(CONFIG.proxy()) .with07::<User, Announce07, Post>(CONFIG.proxy())
.with::<User, Create, Comment>(CONFIG.proxy()) .with::<User, Create, Comment>(CONFIG.proxy())
.with::<User, Create, Post>(CONFIG.proxy()) .with::<User, Create, Post>(CONFIG.proxy())
.with::<User, Delete, Comment>(CONFIG.proxy()) .with::<User, Delete, Comment>(CONFIG.proxy())
@ -57,8 +57,8 @@ pub fn inbox(conn: &DbConn, act: serde_json::Value) -> Result<InboxResult, Error
.with07::<User, Delete07, User>(CONFIG.proxy()) .with07::<User, Delete07, User>(CONFIG.proxy())
.with::<User, Follow, User>(CONFIG.proxy()) .with::<User, Follow, User>(CONFIG.proxy())
.with::<User, Like, Post>(CONFIG.proxy()) .with::<User, Like, Post>(CONFIG.proxy())
.with::<User, Undo, Reshare>(CONFIG.proxy()) .with07::<User, Undo07, Reshare>(CONFIG.proxy())
.with::<User, Undo, follows::Follow>(CONFIG.proxy()) .with07::<User, Undo07, follows::Follow>(CONFIG.proxy())
.with::<User, Undo, likes::Like>(CONFIG.proxy()) .with::<User, Undo, likes::Like>(CONFIG.proxy())
.with::<User, Update, PostUpdate>(CONFIG.proxy()) .with::<User, Update, PostUpdate>(CONFIG.proxy())
.done() .done()