From 6a5bf06d74f632c39d759d2e47c0f11226d26e65 Mon Sep 17 00:00:00 2001 From: silverpill Date: Thu, 15 Sep 2022 21:40:24 +0000 Subject: [PATCH] Ignore Announce(Like) 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 1d88e2f..69fe64d 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, NOTE}, + vocabulary::{CREATE, LIKE, NOTE}, }; use crate::config::Config; use crate::errors::DatabaseError; @@ -30,7 +30,7 @@ pub async fn handle_announce( &config.media_dir(), &activity.actor, ).await?; - if activity.object["type"].as_str() == Some(CREATE) { + if let Some(CREATE) | Some(LIKE) = activity.object["type"].as_str() { // Ignore Announce(Create) activities from Lemmy return Ok(None); };