From b9e485be54317b68c994c5ffa3b2ffe21f767775 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 25 Feb 2015 16:51:39 -0800 Subject: this may actually fix the deliver loop when deleting existing items. It's hackish but I don't see any other way out. --- include/notifier.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include/notifier.php') diff --git a/include/notifier.php b/include/notifier.php index f64732884..22adc78a3 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -371,7 +371,14 @@ function notifier_run($argv, $argc){ // To clarify, a site accepting a new comment is responsible for sending it to the owner for relay. // Relaying should never be initiated on a post that arrived from elsewhere. - $relay_to_owner = (((! $top_level_post) && ($target_item['item_flags'] & ITEM_ORIGIN)) ? true : false); + // We should normally be able to rely on ITEM_ORIGIN, but start_delivery_chain() incorrectly set this + // flag on comments for an extended period. So we'll also call comment_local_origin() which looks at + // the hostname in the message_id and provides a second (fallback) opinion. + + $relay_to_owner = (((! $top_level_post) && ($target_item['item_flags'] & ITEM_ORIGIN) && comment_local_origin()) + ? true + : false + ); $uplink = false; -- cgit v1.2.3