use crate::{
- extensions::context::lemmy_context,
+ extensions::{context::lemmy_context, person_extension::PersonExtension},
objects::{
check_object_domain,
get_source_markdown_value,
object::{ApObject, Image, Tombstone},
prelude::*,
};
-use activitystreams_ext::Ext1;
+use activitystreams_ext::Ext2;
use anyhow::Context;
use lemmy_api_structs::blocking;
use lemmy_db_queries::{ApubObject, DbPool};
..Default::default()
});
- Ok(Ext1::new(ap_actor, self.get_public_key_ext()?))
+ let person_ext = PersonExtension::new(self.matrix_user_id.to_owned())?;
+ Ok(Ext2::new(ap_actor, person_ext, self.get_public_key_ext()?))
}
fn to_tombstone(&self) -> Result<Tombstone, LemmyError> {
unimplemented!()
local: Some(false),
admin: Some(false),
private_key: None,
- public_key: Some(Some(person.ext_one.public_key.to_owned().public_key_pem)),
+ public_key: Some(Some(person.ext_two.public_key.to_owned().public_key_pem)),
last_refreshed_at: Some(naive_now()),
inbox_url: Some(person.inner.inbox()?.to_owned().into()),
shared_inbox_url: Some(shared_inbox),
- matrix_user_id: None, // TODO
+ matrix_user_id: Some(person.ext_one.matrix_user_id.to_owned()),
})
}
}