diff options
author | Felix <me@nutomic.com> | 2020-04-28 19:46:25 +0200 |
---|---|---|
committer | Felix <me@nutomic.com> | 2020-04-28 19:46:25 +0200 |
commit | 0c0c68398609d549a757a9c3a26ce2311075fa38 (patch) | |
tree | fe2f07a1ad195bc042217538fc2b3e54e7a44124 /server/src/apub/user.rs | |
parent | 36d0e34668b94a955306a4b83947deb1f10689f2 (diff) |
Implement deleting communities
Diffstat (limited to 'server/src/apub/user.rs')
-rw-r--r-- | server/src/apub/user.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/server/src/apub/user.rs b/server/src/apub/user.rs index d7fd2282..36147f7a 100644 --- a/server/src/apub/user.rs +++ b/server/src/apub/user.rs @@ -9,7 +9,7 @@ impl ToApub for User_ { type Response = PersonExt; // Turn a Lemmy Community into an ActivityPub group that can be sent out over the network. - fn to_apub(&self, _conn: &PgConnection) -> Result<PersonExt, Error> { + fn to_apub(&self, _conn: &PgConnection) -> Result<ResponseOrTombstone<PersonExt>, Error> { // TODO go through all these to_string and to_owned() let mut person = Person::default(); let oprops: &mut ObjectProperties = person.as_mut(); @@ -41,7 +41,9 @@ impl ToApub for User_ { .set_following(self.get_following_url())? .set_liked(self.get_liked_url())?; - Ok(person.extend(actor_props).extend(self.get_public_key_ext())) + Ok(ResponseOrTombstone::Response( + person.extend(actor_props).extend(self.get_public_key_ext()), + )) } } @@ -87,6 +89,10 @@ impl ActorType for User_ { )?; Ok(()) } + + fn send_delete(&self, _conn: &PgConnection) -> Result<(), Error> { + unimplemented!() + } } impl FromApub for UserForm { |