Ignore Announce(Update) activities

This commit is contained in:
silverpill 2022-09-17 17:29:31 +00:00
parent 24303f00d0
commit 4bc4a5c2f8

View file

@ -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},
vocabulary::{CREATE, LIKE, NOTE, UPDATE},
};
use crate::config::Config;
use crate::errors::DatabaseError;
@ -30,7 +30,7 @@ pub async fn handle_announce(
&config.media_dir(),
&activity.actor,
).await?;
if let Some(CREATE) | Some(LIKE) = activity.object["type"].as_str() {
if let Some(CREATE) | Some(LIKE) | Some(UPDATE) = activity.object["type"].as_str() {
// Ignore Announce(Create) activities from Lemmy
return Ok(None);
};