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/items.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index b7bdad838..d6c6f5043 100755 --- a/include/items.php +++ b/include/items.php @@ -4799,3 +4799,18 @@ function set_linkified_perms($linkified, &$str_contact_allow, &$str_group_allow, } } } + + +/* + * We can't trust ITEM_ORIGIN to tell us if this is a local comment + * which needs to be relayed, because it was misconfigured at one point for several + * months and set for some remote items (in alternate delivery chains). This could + * cause looping, so use this hackish but accurate method. + */ + + +function comment_local_origin($item) { + if(stripos($item['mid'],get_app()->get_hostname()) && ($item['parent'] != $item['id'])) + return true; + return false; +} \ No newline at end of file -- cgit v1.2.3