mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-12-25 19:40:31 +00:00
Add cc and to for Announce
This commit is contained in:
parent
cd9862bc4c
commit
d2c8631ba4
1 changed files with 3 additions and 1 deletions
|
@ -2,7 +2,7 @@ use activitypub::activity::{Announce, Undo};
|
||||||
use chrono::NaiveDateTime;
|
use chrono::NaiveDateTime;
|
||||||
use diesel::{self, PgConnection, QueryDsl, RunQueryDsl, ExpressionMethods};
|
use diesel::{self, PgConnection, QueryDsl, RunQueryDsl, ExpressionMethods};
|
||||||
|
|
||||||
use activity_pub::{Id, IntoId, inbox::{FromActivity, Notify, Deletable}};
|
use activity_pub::{Id, IntoId, inbox::{FromActivity, Notify, Deletable}, PUBLIC_VISIBILTY};
|
||||||
use models::{notifications::*, posts::Post, users::User};
|
use models::{notifications::*, posts::Post, users::User};
|
||||||
use schema::reshares;
|
use schema::reshares;
|
||||||
|
|
||||||
|
@ -67,6 +67,8 @@ impl Reshare {
|
||||||
act.announce_props.set_actor_link(User::get(conn, self.user_id).unwrap().into_id()).unwrap();
|
act.announce_props.set_actor_link(User::get(conn, self.user_id).unwrap().into_id()).unwrap();
|
||||||
act.announce_props.set_object_link(Post::get(conn, self.post_id).unwrap().into_id()).unwrap();
|
act.announce_props.set_object_link(Post::get(conn, self.post_id).unwrap().into_id()).unwrap();
|
||||||
act.object_props.set_id_string(self.ap_url.clone()).unwrap();
|
act.object_props.set_id_string(self.ap_url.clone()).unwrap();
|
||||||
|
act.object_props.set_to_link(Id::new(PUBLIC_VISIBILTY.to_string())).expect("Reshare::into_activity: to error");
|
||||||
|
act.object_props.set_cc_link_vec::<Id>(vec![]).expect("Reshare::into_activity: cc error");
|
||||||
|
|
||||||
act
|
act
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue