mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-26 13:31:02 +00:00
Implement Like::build_undo07()
This commit is contained in:
parent
3093f713ef
commit
fcc9e1d81b
1 changed files with 14 additions and 0 deletions
|
@ -102,6 +102,20 @@ impl Like {
|
||||||
|
|
||||||
Ok(act)
|
Ok(act)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn build_undo07(&self, conn: &Connection) -> Result<Undo07> {
|
||||||
|
let mut act = Undo07::new(
|
||||||
|
User::get(conn, self.user_id)?.ap_url.parse::<IriString>()?,
|
||||||
|
AnyBase::from_extended(self.to_activity07(conn)?)?,
|
||||||
|
);
|
||||||
|
act.set_id(format!("{}#delete", self.ap_url).parse::<IriString>()?);
|
||||||
|
act.set_many_tos(vec![PUBLIC_VISIBILITY.parse::<IriString>()?]);
|
||||||
|
act.set_many_ccs(vec![User::get(conn, self.user_id)?
|
||||||
|
.followers_endpoint
|
||||||
|
.parse::<IriString>()?]);
|
||||||
|
|
||||||
|
Ok(act)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AsObject<User, activity::Like, &DbConn> for Post {
|
impl AsObject<User, activity::Like, &DbConn> for Post {
|
||||||
|
|
Loading…
Reference in a new issue