mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-26 13:31:02 +00:00
Fix Comment::create_activity07()
This commit is contained in:
parent
9969e844ca
commit
713ffb9506
1 changed files with 8 additions and 4 deletions
|
@ -211,8 +211,7 @@ impl Comment {
|
|||
let author = User::get(conn, self.author_id)?;
|
||||
|
||||
let note = self.to_activity07(conn)?;
|
||||
let to = note.to().ok_or(Error::MissingApProperty)?.clone();
|
||||
let cc = note.cc().ok_or(Error::MissingApProperty)?.clone();
|
||||
let note_clone = note.clone();
|
||||
|
||||
let mut act = Create07::new(
|
||||
author.into_id().parse::<IriString>()?,
|
||||
|
@ -225,8 +224,13 @@ impl Comment {
|
|||
)
|
||||
.parse::<IriString>()?,
|
||||
);
|
||||
act.set_many_tos(to);
|
||||
act.set_many_ccs(cc);
|
||||
act.set_many_tos(
|
||||
note_clone
|
||||
.to()
|
||||
.iter()
|
||||
.flat_map(|tos| tos.iter().map(|to| to.to_owned())),
|
||||
);
|
||||
act.set_many_ccs(vec![self.get_author(conn)?.followers_endpoint]);
|
||||
Ok(act)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue