From af839a05892f9446e86327ba04787b3a697c379c Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 1 Mar 2024 15:47:40 +0000 Subject: AS2 Follow/Ignore --- include/items.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/items.php b/include/items.php index a9cbd4075..e26366af5 100644 --- a/include/items.php +++ b/include/items.php @@ -2487,7 +2487,7 @@ function send_status_notifications($post_id,$item) { // check for an unfollow thread activity - we should probably decode the obj and check the id // but it will be extremely rare for this to be wrong. - if(($xx['verb'] === ACTIVITY_UNFOLLOW) + if((in_array($xx['verb'], ['Ignore', ACTIVITY_UNFOLLOW])) && (in_array($xx['obj_type'], ['Note', 'Image', ACTIVITY_OBJ_NOTE, ACTIVITY_OBJ_PHOTO])) && ($xx['parent'] != $xx['id'])) $unfollowed = true; @@ -2514,7 +2514,6 @@ function send_status_notifications($post_id,$item) { if(! $notify) return; - Enotify::submit(array( 'type' => $type, 'from_xchan' => $item['author_xchan'], @@ -4377,7 +4376,7 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C $item_normal = item_normal(); if (! (isset($arr['include_follow']) && intval($arr['include_follow']))) { - $item_normal .= sprintf(" and not verb in ('%s', '%s') ", + $item_normal .= sprintf(" and not verb in ('Follow', 'Ignore', '%s', '%s') ", dbesc(ACTIVITY_FOLLOW), dbesc(ACTIVITY_UNFOLLOW) ); -- cgit v1.2.3