From 53a1837f38aca9c43c5012a9c7eef9cfcc42b17d Mon Sep 17 00:00:00 2001 From: dull b Date: Tue, 4 Jul 2023 03:08:43 +0000 Subject: [PATCH] Revert "Revert "Fix apub::api::resolve_object"" This reverts commit 96ed8bf2e9dcadae760743929498312334e23d2e. --- crates/apub/src/api/resolve_object.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/apub/src/api/resolve_object.rs b/crates/apub/src/api/resolve_object.rs index 0640b0bb7..0f982707c 100644 --- a/crates/apub/src/api/resolve_object.rs +++ b/crates/apub/src/api/resolve_object.rs @@ -41,19 +41,19 @@ async fn convert_response( match object { Person(p) => { removed_or_deleted = p.deleted; - res.person = Some(PersonView::read(&mut *conn, p.id).await?) + res.person = Some(PersonView::read(conn, p.id).await?) } Community(c) => { removed_or_deleted = c.deleted || c.removed; - res.community = Some(CommunityView::read(&mut *conn, c.id, Some(user_id), None).await?) + res.community = Some(CommunityView::read(conn, c.id, Some(user_id), None).await?) } Post(p) => { removed_or_deleted = p.deleted || p.removed; - res.post = Some(PostView::read(&mut *conn, p.id, Some(user_id), None).await?) + res.post = Some(PostView::read(conn, p.id, Some(user_id), None).await?) } Comment(c) => { removed_or_deleted = c.deleted || c.removed; - res.comment = Some(CommentView::read(&mut *conn, c.id, Some(user_id)).await?) + res.comment = Some(CommentView::read(conn, c.id, Some(user_id)).await?) } }; // if the object was deleted from database, dont return it