Skip to content

Commit

Permalink
Prevent thread crash when receiving activities reaching unimplemented…
Browse files Browse the repository at this point in the history
… code

See also LemmyNet#4782
  • Loading branch information
MrKaplan-lw committed Aug 13, 2024
1 parent d985fad commit 70a2ba8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions crates/apub/src/activities/block/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use lemmy_db_schema::{
utils::DbPool,
};
use lemmy_db_views::structs::SiteView;
use lemmy_utils::error::{LemmyError, LemmyResult};
use lemmy_utils::error::{LemmyError, LemmyErrorType, LemmyResult};
use serde::Deserialize;
use url::Url;

Expand Down Expand Up @@ -76,7 +76,11 @@ impl Object for SiteOrCommunity {
}

async fn delete(self, _data: &Data<Self::DataType>) -> Result<(), LemmyError> {
unimplemented!()
// https://github.com/LemmyNet/lemmy/issues/4782
tracing::warn!("Ignoring delete: https://github.com/LemmyNet/lemmy/issues/4782");
Err(LemmyErrorType::Unknown(
"delete not implemented - https://github.com/LemmyNet/lemmy/issues/4782".to_string(),
))?
}

async fn into_json(self, _data: &Data<Self::DataType>) -> Result<Self::Kind, LemmyError> {
Expand Down

0 comments on commit 70a2ba8

Please sign in to comment.