Ignore Announce(Undo) activities
This commit is contained in:
parent
92d96e3745
commit
09cb15297a
1 changed files with 4 additions and 3 deletions
|
@ -5,7 +5,7 @@ use crate::activitypub::{
|
|||
fetcher::helpers::{get_or_import_profile_by_actor_id, import_post},
|
||||
identifiers::parse_local_object_id,
|
||||
receiver::find_object_id,
|
||||
vocabulary::{CREATE, LIKE, NOTE, UPDATE},
|
||||
vocabulary::{CREATE, LIKE, NOTE, UNDO, UPDATE},
|
||||
};
|
||||
use crate::config::Config;
|
||||
use crate::errors::DatabaseError;
|
||||
|
@ -36,8 +36,9 @@ pub async fn handle_announce(
|
|||
&config.media_dir(),
|
||||
&activity.actor,
|
||||
).await?;
|
||||
if let Some(CREATE) | Some(LIKE) | Some(UPDATE) = activity.object["type"].as_str() {
|
||||
// Ignore Announce(Create) activities from Lemmy
|
||||
if let Some(CREATE | LIKE | UNDO | UPDATE) = activity.object["type"].as_str() {
|
||||
// Ignore wrapped activities from Lemmy
|
||||
// https://codeberg.org/fediverse/fep/src/branch/main/feps/fep-1b12.md
|
||||
return Ok(None);
|
||||
};
|
||||
let object_id = find_object_id(&activity.object)?;
|
||||
|
|
Loading…
Reference in a new issue