mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-26 21:41:04 +00:00
Implement Follow::build_undo07()
This commit is contained in:
parent
5f91345d69
commit
174624f5c1
1 changed files with 16 additions and 0 deletions
|
@ -191,6 +191,22 @@ impl Follow {
|
||||||
.set_cc_link_vec(vec![Id::new(PUBLIC_VISIBILITY.to_string())])?;
|
.set_cc_link_vec(vec![Id::new(PUBLIC_VISIBILITY.to_string())])?;
|
||||||
Ok(undo)
|
Ok(undo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn build_undo07(&self, conn: &Connection) -> Result<Undo07> {
|
||||||
|
let mut undo = Undo07::new(
|
||||||
|
User::get(conn, self.follower_id)?
|
||||||
|
.ap_url
|
||||||
|
.parse::<IriString>()?,
|
||||||
|
self.ap_url.parse::<IriString>()?,
|
||||||
|
);
|
||||||
|
undo.set_id(format!("{}/undo", self.ap_url).parse::<IriString>()?);
|
||||||
|
undo.set_many_tos(vec![User::get(conn, self.following_id)?
|
||||||
|
.ap_url
|
||||||
|
.parse::<IriString>()?]);
|
||||||
|
undo.set_many_ccs(vec![PUBLIC_VISIBILITY.parse::<IriString>()?]);
|
||||||
|
|
||||||
|
Ok(undo)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AsObject<User, FollowAct, &DbConn> for User {
|
impl AsObject<User, FollowAct, &DbConn> for User {
|
||||||
|
|
Loading…
Reference in a new issue