Fix Follow::activity07()

This commit is contained in:
Kitaiti Makoto 2022-05-01 07:45:05 +09:00
parent 4e42a34337
commit 05df3b89a1

View File

@ -265,7 +265,9 @@ impl AsObject07<User, FollowAct07, &DbConn> for User {
fn activity07(self, conn: &DbConn, actor: User, id: &str) -> Result<Follow> { fn activity07(self, conn: &DbConn, actor: User, id: &str) -> Result<Follow> {
// Mastodon (at least) requires the full Follow object when accepting it, // Mastodon (at least) requires the full Follow object when accepting it,
// so we rebuilt it here // so we rebuilt it here
let follow = FollowAct07::new(id.parse::<IriString>()?, actor.ap_url.parse::<IriString>()?); let mut follow =
FollowAct07::new(id.parse::<IriString>()?, actor.ap_url.parse::<IriString>()?);
follow.set_id(id.parse::<IriString>()?);
Follow::accept_follow07(conn, &actor, &self, follow, actor.id, self.id) Follow::accept_follow07(conn, &actor, &self, follow, actor.id, self.id)
} }
} }