Ignore Announce(Dislike) activities
This commit is contained in:
parent
68f7b046a1
commit
a14c719d25
2 changed files with 5 additions and 2 deletions
|
@ -6,7 +6,7 @@ use crate::activitypub::{
|
|||
fetcher::helpers::{get_or_import_profile_by_actor_id, import_post},
|
||||
identifiers::parse_local_object_id,
|
||||
receiver::deserialize_into_object_id,
|
||||
vocabulary::{CREATE, LIKE, NOTE, UNDO, UPDATE},
|
||||
vocabulary::{CREATE, DISLIKE, LIKE, NOTE, UNDO, UPDATE},
|
||||
};
|
||||
use crate::config::Config;
|
||||
use crate::database::DatabaseError;
|
||||
|
@ -31,7 +31,9 @@ pub async fn handle_announce(
|
|||
db_client: &mut impl GenericClient,
|
||||
activity: Value,
|
||||
) -> HandlerResult {
|
||||
if let Some(CREATE | LIKE | UNDO | UPDATE) = activity["object"]["type"].as_str() {
|
||||
if let Some(CREATE | DISLIKE | 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);
|
||||
|
|
|
@ -6,6 +6,7 @@ pub const ADD: &str = "Add";
|
|||
pub const ANNOUNCE: &str = "Announce";
|
||||
pub const CREATE: &str = "Create";
|
||||
pub const DELETE: &str = "Delete";
|
||||
pub const DISLIKE: &str = "Dislike";
|
||||
pub const EMOJI_REACT: &str = "EmojiReact";
|
||||
pub const FOLLOW: &str = "Follow";
|
||||
pub const LIKE: &str = "Like";
|
||||
|
|
Loading…
Reference in a new issue