},
activity_queue::send_activity_new,
extensions::context::lemmy_context,
+ fetcher::object_id::ObjectId,
http::is_activity_already_known,
insert_activity,
ActorType,
#[derive(Clone, Debug, Deserialize, Serialize, ActivityFields)]
#[serde(rename_all = "camelCase")]
pub struct AnnounceActivity {
- actor: Url,
- to: PublicUrl,
+ actor: ObjectId<Community>,
+ to: [PublicUrl; 1],
object: AnnouncableActivities,
cc: Vec<Url>,
#[serde(rename = "type")]
context: &LemmyContext,
) -> Result<(), LemmyError> {
let announce = AnnounceActivity {
- actor: community.actor_id(),
- to: PublicUrl::Public,
+ actor: ObjectId::new(community.actor_id()),
+ to: [PublicUrl::Public],
object,
cc: vec![community.followers_url()],
kind: AnnounceType::Announce,