From 4bc4a5c2f8dffed38885c73e946ffdf21c742513 Mon Sep 17 00:00:00 2001 From: silverpill Date: Sat, 17 Sep 2022 17:29:31 +0000 Subject: [PATCH] Ignore Announce(Update) activities --- src/activitypub/handlers/announce.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/activitypub/handlers/announce.rs b/src/activitypub/handlers/announce.rs index 69fe64d..55a8cfe 100644 --- a/src/activitypub/handlers/announce.rs +++ b/src/activitypub/handlers/announce.rs @@ -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); };