mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-29 07:41:20 +00:00
Merge remote-tracking branch 'origin/main' into delete_local_image_on_delete_account
This commit is contained in:
commit
6c34979f34
3 changed files with 20 additions and 5 deletions
|
@ -1,3 +0,0 @@
|
||||||
# Contributing
|
|
||||||
|
|
||||||
See [here](https://join-lemmy.org/docs/en/contributors/01-overview.html) for contributing Instructions.
|
|
|
@ -137,17 +137,22 @@ Lemmy is made possible by a generous grant from the [NLnet foundation](https://n
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
Read the following documentation to setup the development environment and start coding:
|
||||||
|
|
||||||
- [Contributing instructions](https://join-lemmy.org/docs/contributors/01-overview.html)
|
- [Contributing instructions](https://join-lemmy.org/docs/contributors/01-overview.html)
|
||||||
- [Docker Development](https://join-lemmy.org/docs/contributors/03-docker-development.html)
|
- [Docker Development](https://join-lemmy.org/docs/contributors/03-docker-development.html)
|
||||||
- [Local Development](https://join-lemmy.org/docs/contributors/02-local-development.html)
|
- [Local Development](https://join-lemmy.org/docs/contributors/02-local-development.html)
|
||||||
|
|
||||||
|
When working on an issue or pull request, you can comment with any questions you may have so that maintainers can answer them. You can also join the [Matrix Development Chat](https://matrix.to/#/#lemmydev:matrix.org) for general assistance.
|
||||||
|
|
||||||
### Translations
|
### Translations
|
||||||
|
|
||||||
- If you want to help with translating, take a look at [Weblate](https://weblate.join-lemmy.org/projects/lemmy/). You can also help by [translating the documentation](https://github.com/LemmyNet/lemmy-docs#adding-a-new-language).
|
- If you want to help with translating, take a look at [Weblate](https://weblate.join-lemmy.org/projects/lemmy/). You can also help by [translating the documentation](https://github.com/LemmyNet/lemmy-docs#adding-a-new-language).
|
||||||
|
|
||||||
## Contact
|
## Community
|
||||||
|
|
||||||
- [Mastodon](https://mastodon.social/@LemmyDev)
|
- [Matrix Space](https://matrix.to/#/#lemmy-space:matrix.org)
|
||||||
|
- [Lemmy Forum](https://lemmy.ml/c/lemmy)
|
||||||
- [Lemmy Support Forum](https://lemmy.ml/c/lemmy_support)
|
- [Lemmy Support Forum](https://lemmy.ml/c/lemmy_support)
|
||||||
|
|
||||||
## Code Mirrors
|
## Code Mirrors
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
use crate::ban_nonlocal_user_from_local_communities;
|
||||||
use activitypub_federation::config::Data;
|
use activitypub_federation::config::Data;
|
||||||
use actix_web::web::Json;
|
use actix_web::web::Json;
|
||||||
use lemmy_api_common::{
|
use lemmy_api_common::{
|
||||||
|
@ -28,6 +29,18 @@ pub async fn purge_person(
|
||||||
|
|
||||||
purge_local_user_images(data.person_id, &context).await.ok();
|
purge_local_user_images(data.person_id, &context).await.ok();
|
||||||
|
|
||||||
|
let person = Person::read(&mut context.pool(), data.person_id).await?;
|
||||||
|
ban_nonlocal_user_from_local_communities(
|
||||||
|
&local_user_view,
|
||||||
|
&person,
|
||||||
|
true,
|
||||||
|
&data.reason,
|
||||||
|
&Some(true),
|
||||||
|
&None,
|
||||||
|
&context,
|
||||||
|
)
|
||||||
|
.await?;
|
||||||
|
|
||||||
// Clear profile data.
|
// Clear profile data.
|
||||||
Person::delete_account(&mut context.pool(), data.person_id).await?;
|
Person::delete_account(&mut context.pool(), data.person_id).await?;
|
||||||
// Keep person record, but mark as banned to prevent login or refetching from home instance.
|
// Keep person record, but mark as banned to prevent login or refetching from home instance.
|
||||||
|
|
Loading…
Reference in a new issue